Skip to content

Commit

Permalink
Revert "try setting variables"
Browse files Browse the repository at this point in the history
This reverts commit 848fe09.
  • Loading branch information
andreasgriffin committed Nov 9, 2024
1 parent 848fe09 commit a70abe6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,22 @@ on:
jobs:
build:
runs-on: ubuntu-latest
environment:
DOCKER_HOST: tcp://localhost:2375
services:
docker:
image: docker:19.03.12-dind
options: --privileged
ports:
- 2375:2375

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Docker environment
run: |
sudo service docker start
echo "DOCKER_HOST=tcp://localhost:2375" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v3
with:
Expand Down
5 changes: 5 additions & 0 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ def set_docker_environment(self):
if 'GITHUB_ACTIONS' in os.environ:
# Set DOCKER_HOST only if running in GitHub Actions
os.environ['DOCKER_HOST'] = 'tcp://localhost:2375'
else:
# Optionally, handle local settings or leave as default for local Docker usage
if 'DOCKER_HOST' not in os.environ:
# Set to default Unix socket if not specified, or just omit this block to use system default
os.environ['DOCKER_HOST'] = 'unix:///var/run/docker.sock'


def build_in_docker(
Expand Down

0 comments on commit a70abe6

Please sign in to comment.