-
Notifications
You must be signed in to change notification settings - Fork 40
/
docker-compose.yml
57 lines (54 loc) · 1.68 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# To use docker-compose for running the test environment you must
# create a `.env` file with the following contents:
# UID=<uid-of-your-host-machine-user>
# GID=<gid-of-your-host-machine-user>
# DOCKER_GID=<gid-of-the-host-machine-docker-group>
#
# To create the `.env` file, you can run:
# `$ ./run env > .env`
#
# Here is an example of my `.env` file at time of writing:
# UID=1000
# GID=1000
# DOCKER_GID=975
#
# The environment may be built by running:
# `$ docker-compose build`
#
# Non-docker tests may be run with:
# `$ docker-compose run --rm test-runner`
#
# The test-runner docker image runs `./create-environment test`
# with NO_DOCKER=1, since that relys on the host docker daemon.
# The containers for docker tests can be built by running:
# `$ docker-compose run --rm test-runner ./d0cker build-all`
#
# The full test-suite with docker tests can be run with:
# `$ docker-compose run --rm test-runner /vct/run-tests`
version: '3'
services:
test-runner:
build:
context: ./
dockerfile: ./testing/docker/test-runner/Dockerfile
args:
USER_ID: ${UID}
GROUP_ID: ${GID}
DOCKER_GID: ${DOCKER_GID}
image: vct-test-runner:built
command: ["/app/vct/run-tests", "--no-docker"]
network_mode: "host"
user: vct
environment:
- PYTHONUNBUFFERED=1
- USER=vct
volumes:
- ./:/app/vct
- test_runner_cache:/app/vct/.cache
- /var/run/docker.sock:/var/run/docker.sock
volumes:
test_runner_cache: