-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (30 loc) · 963 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
ARG target
FROM golang:1.13-alpine as builder
ARG goarch
ENV GOARCH $goarch
ENV GOPATH /go
ENV CGO_ENABLED 0
ENV GO111MODULE on
WORKDIR /go/src/github.com/minio/
RUN \
apk add --no-cache git && \
git clone https://github.com/minio/mc && cd mc && \
go build -v -ldflags "$(go run buildscripts/gen-ldflags.go)" -o /mc
FROM $target/alpine
COPY qemu-* /usr/bin/
COPY --from=builder /mc /usr/bin/mc
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL \
maintainer="Jesse Stuart <[email protected]>" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.url="https://hub.docker.com/r/jessestuart/mc/" \
org.label-schema.vcs-url="https://github.com/jessestuart/mc-multiarch" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0"
RUN \
apk add --no-cache ca-certificates && \
echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf
ENTRYPOINT ["mc"]