-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile
39 lines (29 loc) · 1.01 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
FROM golang:1.17 as builder
WORKDIR /workspace
COPY . .
RUN go mod download
RUN CGO_ENABLE=0 go build -ldflags "-w -s" -o yaml-readme
FROM alpine:3.10
LABEL "com.github.actions.name"="README helper"
LABEL "com.github.actions.description"="README helper"
LABEL "com.github.actions.icon"="home"
LABEL "com.github.actions.color"="red"
LABEL "repository"="https://github.com/linuxsuren/yaml-readme"
LABEL "homepage"="https://github.com/linuxsuren/yaml-readme"
LABEL "maintainer"="Rick <[email protected]>"
LABEL "Name"="README helper"
ENV LC_ALL C.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
RUN apk add --no-cache \
git \
openssh-client \
libc6-compat \
libstdc++ \
curl
RUN curl -L https://github.com/LinuxSuRen/http-downloader/releases/download/v0.0.67/hd-linux-amd64.tar.gz | tar xzv hd && \
mv hd /usr/bin/hd && \
hd fetch --reset
COPY entrypoint.sh /entrypoint.sh
COPY --from=builder /workspace/yaml-readme /usr/bin/yaml-readme
ENTRYPOINT ["/entrypoint.sh"]