2023-02-06 16:30:35 +00:00
|
|
|
# This is the base image used for Coder images. It's a multi-arch image that is
|
|
|
|
# built in depot.dev for all supported architectures. Since it's built on real
|
|
|
|
# hardware and not cross-compiled, it can have "RUN" commands.
|
2023-05-14 20:37:50 +00:00
|
|
|
FROM alpine:3.18
|
2023-02-06 16:30:35 +00:00
|
|
|
|
|
|
|
# We use a single RUN command to reduce the number of layers in the image.
|
2023-03-07 13:52:45 +00:00
|
|
|
# NOTE: Keep the Terraform version in sync with minTerraformVersion and
|
|
|
|
# maxTerraformVersion in provisioner/terraform/install.go.
|
2023-02-06 16:30:35 +00:00
|
|
|
RUN apk add --no-cache \
|
|
|
|
curl \
|
|
|
|
wget \
|
|
|
|
bash \
|
|
|
|
git \
|
2023-06-06 21:59:56 +00:00
|
|
|
openssl>=3.1.1-r1 \
|
2023-03-07 13:52:45 +00:00
|
|
|
openssh-client \
|
2023-05-14 20:37:50 +00:00
|
|
|
terraform=1.4.6-r1 && \
|
2023-02-06 16:30:35 +00:00
|
|
|
addgroup \
|
|
|
|
-g 1000 \
|
|
|
|
coder && \
|
|
|
|
adduser \
|
|
|
|
-D \
|
|
|
|
-s /bin/bash \
|
|
|
|
-h /home/coder \
|
|
|
|
-u 1000 \
|
|
|
|
-G coder \
|
|
|
|
coder
|
|
|
|
|
|
|
|
USER 1000:1000
|
|
|
|
ENV HOME=/home/coder
|
|
|
|
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt
|
|
|
|
WORKDIR /home/coder
|