-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (19 loc) · 682 Bytes
/
Dockerfile
File metadata and controls
27 lines (19 loc) · 682 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM golang:alpine AS build-env
LABEL maintainer "Alexander Makhinov <monaxgt@gmail.com>" \
repository="https://github.com/MonaxGT/gosddl"
COPY . /go/src/github.com/MonaxGT/gosddl
RUN apk add --no-cache git mercurial \
&& cd /go/src/github.com/MonaxGT/gosddl/service/gosddl \
&& go get -t . \
&& CGO_ENABLED=0 go build -ldflags="-s -w" \
-a \
-installsuffix static \
-o /gosddl
RUN adduser -D app
FROM scratch
COPY --from=build-env /gosddl /app/gosddl
COPY --from=build-env /etc/passwd /etc/passwd
USER app
VOLUME /app/data
WORKDIR /app/data
ENTRYPOINT ["../gosddl"]