forked from rtCamp/action-slack-notify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (37 loc) · 1.51 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
45
46
47
48
49
50
FROM golang:1.14-alpine3.11@sha256:6578dc0c1bde86ccef90e23da3cdaa77fe9208d23c1bb31d942c8b663a519fa5 AS builder
LABEL "com.github.actions.icon"="bell"
LABEL "com.github.actions.color"="yellow"
LABEL "com.github.actions.name"="Slack Notify"
LABEL "com.github.actions.description"="This action will send notification to Slack"
LABEL "org.opencontainers.image.source"="https://github.com/rtCamp/action-slack-notify"
WORKDIR ${GOPATH}/src/github.com/rtcamp/action-slack-notify
COPY main.go ${GOPATH}/src/github.com/rtcamp/action-slack-notify
ENV CGO_ENABLED 0
ENV GOOS linux
RUN go get -v ./...
RUN go build -a -installsuffix cgo -ldflags '-w -extldflags "-static"' -o /go/bin/slack-notify .
# alpine:latest at 2020-01-18T01:19:37.187497623Z
FROM alpine@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
COPY --from=builder /go/bin/slack-notify /usr/bin/slack-notify
ENV VAULT_VERSION 1.0.2
RUN apk update \
&& apk upgrade \
&& apk add \
bash \
jq \
ca-certificates \
python \
py2-pip \
rsync && \
pip install shyaml && \
rm -rf /var/cache/apk/*
# Setup Vault
RUN wget https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip && \
unzip vault_${VAULT_VERSION}_linux_amd64.zip && \
rm vault_${VAULT_VERSION}_linux_amd64.zip && \
mv vault /usr/local/bin/vault
# fix the missing dependency - https://stackoverflow.com/a/35613430
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
COPY *.sh /
RUN chmod +x /*.sh
ENTRYPOINT ["/entrypoint.sh"]