2022-08-01 14:28:38 -05:00
|
|
|
# This is the multi-arch Dockerfile used for Coder. Since it's multi-arch and
|
|
|
|
|
# cross-compiled, it cannot have ANY "RUN" commands. All binaries are built
|
|
|
|
|
# using the go toolchain on the host and then copied into the build context by
|
|
|
|
|
# scripts/build_docker.sh.
|
2023-02-07 03:30:35 +11:00
|
|
|
#
|
|
|
|
|
# If you need RUN commands (e.g. to install tools via apk), add them to
|
|
|
|
|
# Dockerfile.base instead, which supports "RUN" commands.
|
|
|
|
|
ARG BASE_IMAGE
|
|
|
|
|
FROM $BASE_IMAGE
|
2022-05-12 12:59:34 -05:00
|
|
|
|
2022-06-18 14:47:10 -05:00
|
|
|
# LABEL doesn't add any real layers so it's fine (and easier) to do it here than
|
|
|
|
|
# in the build script.
|
|
|
|
|
ARG CODER_VERSION
|
|
|
|
|
LABEL \
|
|
|
|
|
org.opencontainers.image.title="Coder" \
|
|
|
|
|
org.opencontainers.image.description="A tool for provisioning self-hosted development environments with Terraform." \
|
|
|
|
|
org.opencontainers.image.url="https://github.com/coder/coder" \
|
|
|
|
|
org.opencontainers.image.source="https://github.com/coder/coder" \
|
2022-10-21 12:31:10 -05:00
|
|
|
org.opencontainers.image.version="$CODER_VERSION"
|
2022-06-18 14:47:10 -05:00
|
|
|
|
2022-12-20 12:22:27 -08:00
|
|
|
# The coder binary is injected by scripts/build_docker.sh.
|
|
|
|
|
COPY --chown=1000:1000 --chmod=755 coder /opt/coder
|
|
|
|
|
|
2022-05-12 12:59:34 -05:00
|
|
|
ENTRYPOINT [ "/opt/coder", "server" ]
|