generated from xmidt-org/.go-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
44 lines (32 loc) · 1.03 KB
/
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
43
44
## SPDX-FileCopyrightText: 2020 Comcast Cable Communications Management, LLC
## SPDX-License-Identifier: Apache-2.0
FROM docker.io/library/golang:1.19-alpine as builder
WORKDIR /src
ARG VERSION
ARG GITCOMMIT
ARG BUILDTIME
RUN apk add --no-cache --no-progress \
ca-certificates \
make \
curl \
git \
openssh \
gcc \
libc-dev \
upx
RUN mkdir -p /go/bin && \
curl -o /go/bin/spruce https://github.com/geofffranks/spruce/releases/download/v1.29.0/spruce-linux-amd64 && \
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/caduceator /src/caduceator.yaml /src/deploy/packaging/entrypoint.sh /go/bin/spruce /src/Dockerfile /src/NOTICE /src/LICENSE /src/CHANGELOG.md /
RUN mkdir /etc/caduceator/ && touch /etc/caduceator/caduceator.yaml && chmod 666 /etc/caduceator/caduceator.yaml
USER nobody
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 6600
EXPOSE 6601
EXPOSE 6602
EXPOSE 6603
CMD ["/caduceator"]