|
|
|
@ -16,29 +16,23 @@ RUN go build -o ./app ./main.go
|
|
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
|
|
ENV UID=998
|
|
|
|
|
ENV GID=100
|
|
|
|
|
ENV CONFIG=/config
|
|
|
|
|
ENV DATA=/assets
|
|
|
|
|
|
|
|
|
|
ENV UID=998
|
|
|
|
|
ENV PID=100
|
|
|
|
|
VOLUME ["/config", "/assets"]
|
|
|
|
|
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
|
|
|
|
|
RUN mkdir -p /config; \
|
|
|
|
|
mkdir -p /assets; \
|
|
|
|
|
mkdir -p /api
|
|
|
|
|
|
|
|
|
|
RUN chmod 777 /config; \
|
|
|
|
|
chmod 777 /assets
|
|
|
|
|
|
|
|
|
|
RUN mkdir -p /api
|
|
|
|
|
WORKDIR /api
|
|
|
|
|
COPY --from=builder /api/app .
|
|
|
|
|
COPY client ./client
|
|
|
|
|
RUN mkdir /config; \
|
|
|
|
|
mkdir /assets
|
|
|
|
|
|
|
|
|
|
# RUN addgroup -g ${GID} poduser &&\
|
|
|
|
|
# adduser -l -u ${UID} -g poduser poduser &&\
|
|
|
|
|
RUN chown --changes --silent --no-dereference --recursive \
|
|
|
|
|
${UID}:${GID} \
|
|
|
|
|
/assets \
|
|
|
|
|
/config
|
|
|
|
|
|
|
|
|
|
USER poduser
|
|
|
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
VOLUME ["/config", "/assets"]
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT ["./app"]
|