-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
73 lines (65 loc) · 1.95 KB
/
Dockerfile
File metadata and controls
73 lines (65 loc) · 1.95 KB
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
63
64
65
66
67
68
69
70
71
72
73
FROM debian:trixie-slim
### Envs
ENV USER_NAME="app" \
PUID="911" \
PGID="911"
RUN set -eux && \
DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
openssh-server \
openssh-client \
sudo \
tini \
moreutils \
ca-certificates \
tzdata \
git \
golang \
curl \
wget \
netcat-traditional \
nano \
mc \
zip \
unzip && \
apt-get -y autoremove && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
/var/log/* \
/usr/share/man && \
touch /var/log/lastlog /var/log/faillog
COPY root/ /
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# User/Group
RUN set -eux && \
useradd -u ${PUID} -U -d /app -m -s /bin/bash ${USER_NAME} && \
usermod -G users ${USER_NAME} && \
mkdir -p /app && \
chown -R ${PUID}:${PGID} /app
ARG URL
ARG SOURCE
ARG BUILD_DATE
ARG AUTHORS
ARG VENDOR
ARG REVISION
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
LABEL \
"org.opencontainers.image.title"="Openssh" \
"org.opencontainers.image.description"="Openssh" \
"org.opencontainers.image.url"="$URL" \
"org.opencontainers.image.source"="$SOURCE" \
"org.opencontainers.image.version"="8.4" \
"org.opencontainers.image.revision"="$REVISION" \
"org.opencontainers.image.licenses"="MIT" \
"org.opencontainers.image.created"="$BUILD_DATE" \
"org.opencontainers.image.authors"="$AUTHORS" \
"org.opencontainers.image.vendor"="$VENDOR" \
"org.opencontainers.image.base.name"="debian:bookworm-slim" \
"org.opencontainers.image.ref.name"="debian:bookworm-slim"
EXPOSE 2222
VOLUME /app
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/docker-entrypoint.sh"]
CMD ["/usr/sbin/sshd", "-D", "-e", "-f", "/app/sshd/sshd_config"]