forked from xmidt-org/petasos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (29 loc) · 954 Bytes
/
Dockerfile
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM docker.io/library/golang:1.15-alpine as builder
MAINTAINER Jack Murdock <[email protected]>
WORKDIR /src
ARG VERSION
ARG GITCOMMIT
ARG BUILDTIME
RUN apk add --no-cache --no-progress \
ca-certificates \
make \
git \
openssh \
gcc \
libc-dev \
upx
RUN go get github.com/geofffranks/spruce/cmd/spruce && chmod +x /go/bin/spruce
COPY . .
RUN make test release
FROM alpine:3.12.1
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /src/petasos /src/petasos.yaml /src/deploy/packaging/entrypoint.sh /go/bin/spruce /src/Dockerfile /src/NOTICE /src/LICENSE /src/CHANGELOG.md /
COPY --from=builder /src/deploy/packaging/petasos_spruce.yaml /tmp/petasos_spruce.yaml
RUN mkdir /etc/petasos/ && touch /etc/petasos/petasos.yaml && chmod 666 /etc/petasos/petasos.yaml
USER nobody
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 6400
EXPOSE 6401
EXPOSE 6402
EXPOSE 6403
CMD ["/petasos"]