Files
DurpAPI/Dockerfile
2023-05-21 09:58:53 -05:00

28 lines
378 B
Docker

FROM registry.durp.info/golang:1.20-alpine
RUN chmod -R o=,g=rwX /go
RUN mkdir /app
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid "10001" \
"durp"
WORKDIR /app
COPY . .
RUN chown -R durp /app
USER durp
ENV GOPATH /go
ENV PATH $PATH:$GOPATH/bin
EXPOSE 8080
# Run the application
CMD ["./main"]