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 5a6c162
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,26 @@ 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

- 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 5a6c162

Please sign in to comment.