-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
28 lines (28 loc) · 1002 Bytes
/
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
version: '3.4'
services:
main:
container_name: ${PROJECT_NAME}_${HOST_UID:-4000}
hostname: ${PROJECT_NAME}
# These variables are passed into the container.
environment:
- UID=${HOST_UID:-4000}
- PROJECTS_HOME=/home/${HOST_USER:-nodummy}/${PROJECT_NAME}/projects
- PYTHONPATH=/home/${HOST_USER:-nodummy}/${PROJECT_NAME}
# Run with user priviliges by default.
user: ${HOST_USER:-nodummy}
working_dir: /home/${HOST_USER}/${PROJECT_NAME}
image: ${PROJECT_NAME}:${HOST_USER:-nodummy}
build:
context: .
# Build for current user.
target: user
dockerfile: Dockerfile
# These variables are passed to Dockerfile.
args:
- HOST_UID=${HOST_UID:-4000}
- HOST_USER=${HOST_USER:-nodummy}
# Run container as a service. Replace with something useful.
command: ["tail", "-f", "/dev/null"]
# Copy current (git-) project into container.
volumes:
- ${PWD:-.}:/home/${HOST_USER}/${PROJECT_NAME}