-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
24 lines (22 loc) · 912 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
# FROM golang AS download
# WORKDIR /tmp
# # RUN curl -L -o hjm-certcheck https://github.com/hjmcloud/hjm-certcheck/releases/latest/download/hjm-certcheck_linux_$(go env GOARCH)
# ARG src=temp/linux_$(go env GOARCH)
# COPY ${src} ./hjm-certcheck
FROM alpine
# Install dependencies
ARG TARGETARCH
RUN echo "I'm building for $TARGETARCH"
ENV TZ Asia/Shanghai
RUN apk update && apk add tzdata ca-certificates bash
# Install hjm-certcheck
ENV WORKDIR /app
ADD resource $WORKDIR/
# ADD ./temp/linux_amd64/main $WORKDIR/main
COPY temp/hjm-certcheck_linux_$TARGETARCH $WORKDIR/hjm-certcheck
RUN chmod +x $WORKDIR/hjm-certcheck
###############################################################################
# START
###############################################################################
WORKDIR $WORKDIR
CMD ./hjm-certcheck