-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
46 lines (46 loc) · 1.06 KB
/
docker-compose.yaml
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
services:
# used to build the production image
r:
image: r
build:
context: .
target: r
cache_from: # should speed up the build in CI, where we have a cold cache
- ghcr.io/opensafely-core/base-docker
- ghcr.io/opensafely-core/r
args:
# this makes the image work for later cache_from: usage
- BUILDKIT_INLINE_CACHE=1
# env vars supplied by make/just
- BUILD_DATE
- REVISION
- VERSION
init: true
platform: linux/amd64
add-package:
extends: r
image: "${IMAGE_TAG:-}"
build:
target: add-package
args:
- PACKAGE
- REPOS
platform: linux/amd64
rstudio:
extends: r
image: rstudio
build:
target: rstudio
args:
# supplied by just
- RSTUDIO_BASE_URL
- RSTUDIO_DEB
ports:
- 8787:8787
platform: linux/amd64
volumes:
- ${PWD}:/workspace
- ${HOME}/.gitconfig:/home/rstudio/local-gitconfig
environment:
HOSTPLATFORM: ${HOSTPLATFORM}
HOSTUID: ${HOSTUID}