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 848fe09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,19 @@ 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: 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 848fe09

Please sign in to comment.