mirror of
https://github.com/terorie/od-database-crawler.git
synced 2025-04-19 18:36:43 +00:00
Buildfile for a clean docker image
This commit is contained in:
parent
8b9d8bfd17
commit
23c5c6679e
19
Dockerfile
19
Dockerfile
@ -1,10 +1,11 @@
|
|||||||
FROM golang:1.11.5 AS builder
|
FROM golang:alpine as builder
|
||||||
ADD . /src
|
RUN apk add git && \
|
||||||
RUN cd /src \
|
go get -d -v github.com/terorie/od-database-crawler
|
||||||
&& go test . \
|
WORKDIR /go/src/github.com/terorie/od-database-crawler
|
||||||
&& go build -o binary
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /go/od-database-crawler .
|
||||||
|
|
||||||
FROM alpine
|
FROM scratch
|
||||||
WORKDIR /app
|
COPY script/ca-certificates.crt /etc/ssl/certs/
|
||||||
COPY --from=builder /src/binary /app/
|
COPY --from=builder /go/od-database-crawler /go/
|
||||||
ENTRYPOINT [ "/app/binary", "server" ]
|
VOLUME [ "/go" ]
|
||||||
|
CMD ["/go/od-database-crawler", "server"]
|
3895
script/ca-certificates.crt
Normal file
3895
script/ca-certificates.crt
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user