@ -2,9 +2,16 @@ FROM golang:1.23.4
|
||||
|
||||
WORKDIR /api
|
||||
|
||||
COPY *.go ./
|
||||
RUN useradd runner -r -u 1001 -d /api
|
||||
RUN chown -R runner:runner /api
|
||||
USER runner
|
||||
|
||||
COPY *.mod ./
|
||||
COPY *.sum ./
|
||||
|
||||
RUN go mod download
|
||||
|
||||
COPY *.go ./
|
||||
COPY Makefile ./
|
||||
COPY config ./config
|
||||
COPY database ./database
|
||||
@ -14,7 +21,6 @@ COPY status ./status
|
||||
COPY util ./util
|
||||
COPY views ./views
|
||||
|
||||
EXPOSE 7001
|
||||
RUN make
|
||||
|
||||
ENTRYPOINT ["/api/api.elf"]
|
||||
|
Reference in New Issue
Block a user