+3
-10
Containerfile
+3
-10
Containerfile
···
2
3
ARG TAG='v1.11.0-alpha'
4
5
-
ENV KNOT_REPO_SCAN_PATH=/home/git
6
ENV CGO_ENABLED=1
7
8
WORKDIR /app
9
-
10
RUN apk add --no-cache git gcc musl-dev
11
RUN echo "${TAG}" > /VERSION && \
12
echo "Building tag: ${TAG}" && \
···
15
16
FROM alpine:latest
17
18
-
EXPOSE 22
19
EXPOSE 5555
20
21
-
ARG UID=1000
22
-
ARG GID=1000
23
-
24
RUN apk add --no-cache shadow s6-overlay execline openssl openssh git curl bash
25
26
COPY --from=builder /usr/bin/knot /usr/bin
27
COPY --from=builder /VERSION /
28
COPY rootfs /
29
30
-
RUN groupadd -g $GID git && \
31
-
useradd -u $UID -g $GID -m -d /home/git -s /bin/bash -p "*" git && \
32
mkdir -p /etc/ssh/keys && \
33
-
mkdir -p /app && \
34
-
chown -R git:git /app /home/git && \
35
chmod 755 /etc && \
36
chmod -R 755 /etc/s6-overlay
37
···
2
3
ARG TAG='v1.11.0-alpha'
4
5
ENV CGO_ENABLED=1
6
7
WORKDIR /app
8
RUN apk add --no-cache git gcc musl-dev
9
RUN echo "${TAG}" > /VERSION && \
10
echo "Building tag: ${TAG}" && \
···
13
14
FROM alpine:latest
15
16
+
EXPOSE 2222
17
EXPOSE 5555
18
19
RUN apk add --no-cache shadow s6-overlay execline openssl openssh git curl bash
20
21
COPY --from=builder /usr/bin/knot /usr/bin
22
COPY --from=builder /VERSION /
23
COPY rootfs /
24
25
+
RUN groupadd -g 9001 git && \
26
+
useradd -u 9001 -g git -m -d /home/git -s /bin/bash -p "*" git && \
27
mkdir -p /etc/ssh/keys && \
28
chmod 755 /etc && \
29
chmod -R 755 /etc/s6-overlay
30
+1
-1
rootfs/etc/s6-overlay/s6-rc.d/knotserver/run
+1
-1
rootfs/etc/s6-overlay/s6-rc.d/knotserver/run
+1
-1
rootfs/etc/s6-overlay/s6-rc.d/sshd/run
+1
-1
rootfs/etc/s6-overlay/s6-rc.d/sshd/run
+3
-2
rootfs/etc/s6-overlay/scripts/generate-motd
+3
-2
rootfs/etc/s6-overlay/scripts/generate-motd
History
1 round
0 comments
sullen.net
submitted
#0
1 commit
expand
collapse
f985dac0
Configure for pure rootless
expand 0 comments
pull request successfully merged