Skip to content

Commit

Permalink
try setting variables
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasgriffin committed Nov 9, 2024
1 parent bac97f2 commit 4d5ef3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,21 @@ jobs:
options: --privileged
ports:
- 2375:2375
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2


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


- name: Set up Docker environment
- name: Test Docker commands
run: |
sudo service docker start
echo "DOCKER_HOST=tcp://localhost:2375" >> $GITHUB_ENV
docker version
docker info
- name: Set up Python
uses: actions/setup-python@v3
Expand Down
5 changes: 0 additions & 5 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,6 @@ 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 4d5ef3a

Please sign in to comment.