This commit is contained in:
Divyam 2023-08-18 21:40:38 +05:30
parent 3aeb7f83f8
commit fd9a8903e1
2 changed files with 1 additions and 18 deletions

View file

@ -2,19 +2,6 @@ FROM golang:alpine as builder
RUN apk update && apk add --no-cache git ca-certificates tzdata && update-ca-certificates
ENV USER=appuser
ENV UID=10001
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid "${UID}" \
"${USER}"
WORKDIR /app
# use modules
@ -36,13 +23,9 @@ WORKDIR /app
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /etc/group /etc/group
COPY --from=builder /app/teldrive /app/teldrive
USER appuser:appuser
EXPOSE 8080
ENTRYPOINT ["/app/teldrive"]

View file

@ -6,7 +6,7 @@ services:
restart: always
container_name: server
volumes:
- ./sessions:/app/sessions
- ./sessions:/app/sessions:rw
- ./database:/app/database
env_file: .env
ports: