File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed
Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 2222 id : docker_build
2323 uses : docker/build-push-action@v2.5.0
2424 with :
25- file : ./Dockerfile
25+ file : ./Dockerfile.prod
2626 push : true
2727 tags : |
2828 atsigncompany/filebin2:automated
Original file line number Diff line number Diff line change 1+ FROM golang:buster AS build
2+ RUN export DEBIAN_FRONTEND=noninteractive && \
3+ apt-get install -y make gcc libc-dev git
4+ WORKDIR /app
5+ RUN go get -u github.com/jstemmer/go-junit-report
6+ RUN go get -u github.com/GeertJohan/go.rice/rice
7+ COPY . .
8+ RUN go build -tags netgo -ldflags '-extldflags "-static"'
9+
10+ FROM debian:stable-slim
11+ ENV HOMEDIR=/home/filebin2
12+ ENV USER_ID=1024
13+ ENV GROUP_ID=1024
14+ RUN apt-get update && \
15+ apt-get upgrade -y && \
16+ apt-get install ca-certificates -y && \
17+ update-ca-certificates && \
18+ mkdir -p $HOMEDIR && \
19+ mkdir -p /var/log/filebin && \
20+ addgroup --gid $GROUP_ID filebin2 && \
21+ useradd --system --uid $USER_ID --gid $GROUP_ID --shell /bin/bash \
22+ --home $HOMEDIR filebin2 && \
23+ chown -R filebin2:filebin2 $HOMEDIR && \
24+ chown -R filebin2:filebin2 /var/log/filebin
25+ COPY --from=build --chown=filebin2:filebin2 /app/filebin2 \
26+ /usr/local/bin/filebin2
27+ WORKDIR $HOMEDIR
28+ USER filebin2
29+ ENTRYPOINT ["/usr/local/bin/filebin2"]
You can’t perform that action at this time.
0 commit comments