-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (31 loc) · 1.42 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
35
36
37
38
39
40
41
FROM caddy:2.8.4-alpine
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
ARG version=HEAD
RUN apk add --no-cache rsync=~3 openssh=~9 ruby=~3
COPY etc/ /etc
COPY cleanup.rb /usr/local/bin
# The -D switch sets the password hash to "!". As no password hashes
# to this string, this disables password login. However, ! is also
# interpreted to mean locked, so SSH key logins wont work either. So
# change it to "*" which matches no hashes either, but isn't locked.
RUN adduser -Dh /srv store && \
echo "store:*" | chpasswd -e && \
mkdir /srv/backstore && \
chown -R store.store /srv
# Use S6-overlay as init.
ADD https://github.com/just-containers/s6-overlay/releases/download/v1.21.8.0/s6-overlay-amd64.tar.gz /tmp/
RUN gunzip -c /tmp/s6-overlay-amd64.tar.gz | tar -xf - -C /; \
rm -f /tmp/s6-overlay-amd64.tar.gz
# Export env to s6 started services.
ENV S6_KEEP_ENV 1
LABEL org.opencontainers.image.version=${version}
LABEL org.opencontainers.image.title=Backstore
LABEL org.opencontainers.image.description="simple image for storing BackstopJS reports"
LABEL org.opencontainers.image.url=https://github.com/reload/backstore
LABEL org.opencontainers.image.documentation=https://github.com/reload/backstore
LABEL org.opencontainers.image.vendor="Reload"
LABEL org.opencontainers.image.licenses=Apache-2.0
LABEL org.opencontainers.image.source="https://github.com/reload/backstore"
EXPOSE 80
EXPOSE 1985
ENTRYPOINT ["/init"]