forked from SumoLogic/sumologic-docker-logging-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (22 loc) · 1.05 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
# From https://github.com/jahkeup/updater53/blob/master/Dockerfile
###############################################################################
FROM golang:1.8 as builder
WORKDIR /go/src/github.com/SumoLogic/docker-logging-driver
COPY . .
ARG GOOS=linux
ARG GOARCH=amd64
ARG GOARM=
RUN go get -d -v ./...
RUN CGO_ENABLED=0 go build -v -a -installsuffix cgo -o docker-logging-driver
###############################################################################
FROM debian:latest as certs
RUN apt-get update && \
apt-get install -y ca-certificates && \
rm -rf /var/lib/apt/lists/*
RUN cp /etc/ca-certificates.conf /tmp/caconf && cat /tmp/caconf | \
grep -v "mozilla/CNNIC_ROOT\.crt" > /etc/ca-certificates.conf && \
update-ca-certificates --fresh
###############################################################################
FROM scratch
COPY --from=builder /go/src/github.com/SumoLogic/docker-logging-driver/docker-logging-driver /usr/bin/docker-logging-driver
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt