-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
34 lines (34 loc) · 1.49 KB
/
Dockerfile
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
ARG DEBIAN_VERSION=bookworm
FROM debian:${DEBIAN_VERSION}-slim
# We must declare the ARG again so we can use it after the FROM
ARG DEBIAN_VERSION
# Install ssh, curl, and gpg (required for apt-key).
RUN DEBIAN_FRONTEND=noninteractive apt-get \
-o DPkg::options::="--force-confdef" \
-o DPkg::options::="--force-confold" \
update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get \
-o DPkg::options::="--force-confdef" \
-o DPkg::options::="--force-confold" \
install --no-install-recommends -y ssh curl ca-certificates
# Install ET
# https://eternalterminal.dev/download/
RUN echo "deb [signed-by=/usr/share/keyrings/et.gpg] https://mistertea.github.io/debian-et/debian-source/ ${DEBIAN_VERSION} main" > /etc/apt/sources.list.d/et-${DEBIAN_VERSION}.list \
&& curl -fsSL https://mistertea.github.io/debian-et/et.gpg -o /tmp/et.gpg \
&& install -o root -g root -m 644 /tmp/et.gpg /usr/share/keyrings/ \
&& DEBIAN_FRONTEND=noninteractive apt-get \
-o DPkg::options::="--force-confdef" \
-o DPkg::options::="--force-confold" \
update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get \
-o DPkg::options::="--force-confdef" \
-o DPkg::options::="--force-confold" \
install --no-install-recommends -y et \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Create an unprivileged user
RUN useradd --create-home --user-group user
WORKDIR /home/user
USER user
COPY --chown=user ssh-et test-ssh-et-from-docker ./
ENTRYPOINT ["/home/user/test-ssh-et-from-docker"]