feat: use centos images
This commit is contained in:
parent
0c567a6c8a
commit
66d4e0f273
2
.gitignore
vendored
2
.gitignore
vendored
@ -25,4 +25,4 @@ _testmain.go
|
|||||||
*.prof
|
*.prof
|
||||||
|
|
||||||
/vendor
|
/vendor
|
||||||
main
|
#main
|
||||||
|
18
Dockerfile
18
Dockerfile
@ -1,17 +1,13 @@
|
|||||||
FROM golang:alpine AS build
|
FROM centos
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/yumc.pw/cloud/html2pic
|
|
||||||
ADD . .
|
|
||||||
RUN go build -o main
|
|
||||||
|
|
||||||
FROM alpine:edge
|
|
||||||
LABEL maintainer="MiaoWoo<admin@yumc.pw>"
|
LABEL maintainer="MiaoWoo<admin@yumc.pw>"
|
||||||
|
|
||||||
ENV LANG C.UTF-8
|
ENV LANG C.UTF-8
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
RUN apk add --no-cache ca-certificates
|
RUN yum install -y fontconfig
|
||||||
|
|
||||||
COPY --from=build /go/src/github.com/yumc.pw/cloud/html2pic/main ./main
|
ADD main main
|
||||||
ADD lib /root/lib
|
ADD lib lib
|
||||||
|
|
||||||
CMD ./main -lib /root/lib
|
ENV LIB_DIR=/root/lib
|
||||||
|
|
||||||
|
CMD ./main -lib ${LIB_DIR}
|
||||||
|
Loading…
Reference in New Issue
Block a user