Skip to content

Commit 828f94b

Browse files
committed
docker: add Fedora 39 based image
Fixes #6661
1 parent 413c47a commit 828f94b

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

ci/release-image/Dockerfile.fedora

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# syntax=docker/dockerfile:experimental
2+
3+
ARG BASE=fedora:39
4+
FROM scratch AS packages
5+
COPY release-packages/code-server*.rpm /tmp/
6+
7+
FROM $BASE
8+
9+
RUN dnf update -y \
10+
&& dnf install -y \
11+
curl \
12+
git \
13+
git-lfs \
14+
htop \
15+
nano \
16+
openssh-clients \
17+
procps \
18+
wget \
19+
zsh \
20+
dumb-init \
21+
glibc-langpack-en \
22+
&& rm -rf /var/cache/dnf
23+
RUN git lfs install
24+
25+
ENV LANG=en_US.UTF-8
26+
RUN echo 'LANG="en_US.UTF-8"' > /etc/locale.conf
27+
28+
RUN useradd -u 1000 coder && echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
29+
30+
RUN ARCH="$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g')" \
31+
&& curl -fsSL "https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - \
32+
&& chown root:root /usr/local/bin/fixuid \
33+
&& chmod 4755 /usr/local/bin/fixuid \
34+
&& mkdir -p /etc/fixuid \
35+
&& printf "user: coder\ngroup: coder\n" > /etc/fixuid/config.yml
36+
37+
COPY ci/release-image/entrypoint.sh /usr/bin/entrypoint.sh
38+
RUN --mount=from=packages,src=/tmp,dst=/tmp/packages dnf install -y /tmp/packages/code-server*$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g').rpm
39+
40+
# Allow users to have scripts run on container startup to prepare workspace.
41+
# https://github.com/coder/code-server/issues/5177
42+
ENV ENTRYPOINTD=${HOME}/entrypoint.d
43+
44+
EXPOSE 8080
45+
# This way, if someone sets $DOCKER_USER, docker-exec will still work as
46+
# the uid will remain the same. note: only relevant if -u isn't passed to
47+
# docker-run.
48+
USER 1000
49+
ENV USER=coder
50+
WORKDIR /home/coder
51+
ENTRYPOINT ["/usr/bin/entrypoint.sh", "--bind-addr", "0.0.0.0:8080", "."]

ci/release-image/docker-bake.hcl

+12
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,15 @@ target "code-server-ubuntu-focal" {
6666
}
6767
platforms = ["linux/amd64", "linux/arm64"]
6868
}
69+
70+
target "code-server-fedora-39" {
71+
dockerfile = "ci/release-image/Dockerfile.fedora"
72+
tags = concat(
73+
gen_tags_for_docker_and_ghcr("fedora"),
74+
gen_tags_for_docker_and_ghcr("39"),
75+
)
76+
args = {
77+
BASE = "fedora:39"
78+
}
79+
platforms = ["linux/amd64", "linux/arm64"]
80+
}

0 commit comments

Comments
 (0)