Skip to content

Commit 3730ebe

Browse files
committed
docker: rename docker to dockerfiles
Since python3.3 python will not only import files with __init__.py, but instead also imports directory trees which contain a single python file. Therefore python running in the main repository directory will detect docker as a module and imports it. This in turn shadows the real docker module, if it is installed and breaks the tests docker import check. Move the docker files into a new dockerfiles directory which does not shadow the module name. Signed-off-by: Rouven Czerwinski <[email protected]>
1 parent a47f9d0 commit 3730ebe

File tree

20 files changed

+18
-18
lines changed

20 files changed

+18
-18
lines changed

.github/workflows/docker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
password: ${{ secrets.DOCKERHUB_TOKEN }}
1717
- name: Build docker image
1818
run: |
19-
./docker/build.sh
20-
docker-compose -f docker/staging/docker-compose.yml up --exit-code-from client client
21-
docker-compose -f docker/staging/docker-compose.yml down
19+
./dockerfiles/build.sh
20+
docker-compose -f dockerfiles/staging/docker-compose.yml up --exit-code-from client client
21+
docker-compose -f dockerfiles/staging/docker-compose.yml down
2222
docker images
2323
docker tag labgrid-client ${{ secrets.DOCKERHUB_PREFIX }}client
2424
docker tag labgrid-exporter ${{ secrets.DOCKERHUB_PREFIX }}exporter

.github/workflows/unit-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ jobs:
6565
- uses: actions/checkout@v2
6666
- name: Build docker images
6767
run: |
68-
./docker/build.sh
69-
docker-compose -f docker/staging/docker-compose.yml up --exit-code-from client client
70-
docker-compose -f docker/staging/docker-compose.yml down
68+
./dockerfiles/build.sh
69+
docker-compose -f dockerfiles/staging/docker-compose.yml up --exit-code-from client client
70+
docker-compose -f dockerfiles/staging/docker-compose.yml down
7171
- name: Show docker images
7272
run: |
7373
docker images

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
/dist
1818
/.pytest_cache/
1919
/htmlcov/
20-
/docker/staging/crossbar/*
21-
!/docker/staging/crossbar/places_example.yaml
20+
/dockerfiles/staging/crossbar/*
21+
!/dockerfiles/staging/crossbar/places_example.yaml
2222
/.idea

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ matrix:
3737
services:
3838
- docker
3939
script:
40-
- ./docker/build.sh
41-
- docker-compose -f docker/staging/docker-compose.yml up --exit-code-from client client
42-
- docker-compose -f docker/staging/docker-compose.yml down
40+
- ./dockerfiles/build.sh
41+
- docker-compose -f dockerfiles/staging/docker-compose.yml up --exit-code-from client client
42+
- docker-compose -f dockerfiles/staging/docker-compose.yml down
4343
- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$DOCKER_USERNAME" != "" ] && [ "$DOCKER_TOKEN" != "" ]; then
4444
echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin;
4545
docker images;

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/docker/ @krevsbech
1+
/dockerfiles/ @krevsbech

docker/README.rst renamed to dockerfiles/README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ Example showing how to build labgrid-client image:
2222

2323
.. code-block:: bash
2424
25-
$ docker build -t labgrid-client -f docker/client/Dockerfile .
25+
$ dockerfiles build -t labgrid-client -f dockerfiles/client/Dockerfilesfile .
2626
2727
You can also choose to build all 3 images,
2828
with the included script
2929
(which also must be run from the root of this repository):
3030

3131
.. code-block:: bash
3232
33-
$ ./docker/build.sh
33+
$ ./dockerfiles/build.sh
3434
3535
3636
Usage
@@ -119,13 +119,13 @@ To use the staging environment to conduct a smoke test first build the images as
119119

120120
.. code-block:: bash
121121
122-
$ ./docker/build.sh
122+
$ ./dockerfiles/build.sh
123123
124124
Then use docker compose to start all services except the client:
125125

126126
.. code-block:: bash
127127
128-
$ cd docker/staging
128+
$ cd dockerfiles/staging
129129
$ CURRENT_UID=$(id -u):$(id -g) docker-compose up -d coordinator exporter dut
130130
131131
To run the smoke test just run the client:
File renamed without changes.

docker/build.sh renamed to dockerfiles/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
set -ex
44

55
for dir in base client exporter coordinator; do
6-
docker build -t labgrid-${dir} -f docker/${dir}/Dockerfile .
6+
docker build -t labgrid-${dir} -f dockerfiles/${dir}/Dockerfile .
77
done
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)