mirror of
https://codeberg.org/scip/ephemerup.git
synced 2025-12-17 04:30:57 +01:00
reorg dir structure, add docker image build
This commit is contained in:
33
Dockerfile
Normal file
33
Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
# syntax=docker/dockerfile:1 -*-python-*-
|
||||
FROM golang:1.20-alpine as builder
|
||||
|
||||
RUN apk update
|
||||
RUN apk upgrade
|
||||
RUN apk add --no-cache git make bash binutils
|
||||
|
||||
RUN git --version
|
||||
|
||||
WORKDIR /work
|
||||
|
||||
COPY go.mod .
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN make && strip upd
|
||||
|
||||
FROM alpine:3.17
|
||||
LABEL maintainer="Uploads Author <info@daemon.de>"
|
||||
|
||||
RUN install -o 1001 -g 1001 -d /data
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /work/upd /app/upd
|
||||
|
||||
ENV UPD_LISTEN=:8080
|
||||
ENV UPD_STORAGEDIR=/data
|
||||
ENV UPD_DBFILE=/data/bbolt.db
|
||||
ENV UPD_DEBUG=1
|
||||
|
||||
USER 1001:1001
|
||||
EXPOSE 8080
|
||||
VOLUME /data
|
||||
CMD ["/app/upd"]
|
||||
Reference in New Issue
Block a user