-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.vnc
62 lines (54 loc) · 1.91 KB
/
Dockerfile.vnc
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
57
58
59
60
61
62
# syntax=docker/dockerfile:1.4
# parameters
ARG EXERCISE_NAME="<LX_NAME_HERE>"
ARG DESCRIPTION="VNC - <DESCRIPTION_HERE>"
ARG MAINTAINER="<YOUR_FULL_NAME> (<YOUR_EMAIL_ADDRESS>)"
# ==================================================>
# ==> Do not change the code below this line
ARG ARCH
ARG DISTRO=daffy
ARG DOCKER_REGISTRY=docker.io
ARG BASE_IMAGE=dt-gui-tools
ARG BASE_TAG=${DISTRO}-${ARCH}
ARG LAUNCHER=default
# define base image
FROM ${DOCKER_REGISTRY}/duckietown/${BASE_IMAGE}:${BASE_TAG} as base
# recall all arguments
ARG DISTRO
ARG EXERCISE_NAME
ARG DESCRIPTION
ARG MAINTAINER
ARG BASE_TAG
ARG BASE_IMAGE
ARG LAUNCHER
# - buildkit
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
# check build arguments
RUN dt-build-env-check "${EXERCISE_NAME}" "${MAINTAINER}" "${DESCRIPTION}"
# install apt dependencies
COPY --from=recipe ./dependencies-apt.txt "/tmp/"
RUN dt-apt-install /tmp/dependencies-apt.txt
# install python3 dependencies
ARG PIP_INDEX_URL="https://pypi.org/simple"
ENV PIP_INDEX_URL=${PIP_INDEX_URL}
COPY --from=recipe ./dependencies-py3.* "/tmp/"
RUN python3 -m pip install -r /tmp/dependencies-py3.txt
# store module metadata
LABEL org.duckietown.label.module.type="exercise-vnc" \
org.duckietown.label.module.name="${EXERCISE_NAME}" \
org.duckietown.label.module.description="${DESCRIPTION}" \
org.duckietown.label.platform.os="${TARGETOS}" \
org.duckietown.label.platform.architecture="${TARGETARCH}" \
org.duckietown.label.platform.variant="${TARGETVARIANT}" \
org.duckietown.label.code.location="ND" \
org.duckietown.label.code.version.distro="${DISTRO}" \
org.duckietown.label.base.image="${BASE_IMAGE}" \
org.duckietown.label.base.tag="${BASE_TAG}" \
org.duckietown.label.maintainer="${MAINTAINER}"
# set the VNC as the default launcher
CMD ["dt-launcher-vnc"]
# <== Do not change the code above this line
# <==================================================