forked from 0x3333/smbpasswd-web
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
26 lines (21 loc) · 922 Bytes
/
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
FROM alpine:3.21.1@sha256:b97e2a89d0b9e4011bb88c02ddf01c544b8c781acf1f4d559e7c8f12f1047ac3
COPY --chown=root:root ./src/ /app/
COPY --chown=root:root ./docker/entrypoint.sh /
WORKDIR /app
RUN apk add --update --no-cache samba-common-tools=4.20.6-r1 \
python3=3.12.8-r1 \
curl=8.11.1-r0 \
poetry=1.8.4-r0 \
samba-common=4.20.6-r1 \
&& chown root:root /app \
&& mkdir /app/home \
&& adduser -S -D -H -h /app/home appuser \
&& chown appuser:root /app/home \
&& chmod 0700 /app/home \
&& chmod 0555 /app/app.py /entrypoint.sh \
&& mkdir /.cache && chown nobody:nobody /.cache
USER appuser
RUN poetry install
EXPOSE 8080
HEALTHCHECK --interval=1m --timeout=30s --start-period=5s --retries=3 CMD curl -H 'Host: '"$HOST" http://127.0.0.1:8080/"$WEBPATH" -f
ENTRYPOINT [ "/entrypoint.sh" ]