@ -1,27 +1,20 @@
FROM golang:1.10.1- alpine3.7
FROM alpine: 3.7
LABEL maintainer="Minio Inc <dev@minio.io>"
LABEL maintainer="Minio Inc <dev@minio.io>"
ENV GOPATH /go
COPY dockerscripts/docker-entrypoint.sh dockerscripts/healthcheck.sh /usr/bin/
ENV PATH $PATH:$GOPATH/bin
COPY minio /usr/bin/
ENV CGO_ENABLED 0
ENV MINIO_UPDATE off
ENV MINIO_UPDATE off
ENV MINIO_ACCESS_KEY_FILE=access_key \
ENV MINIO_ACCESS_KEY_FILE=access_key \
MINIO_SECRET_KEY_FILE=secret_key
MINIO_SECRET_KEY_FILE=secret_key
WORKDIR /go/src/github.com/minio/
COPY dockerscripts/docker-entrypoint.sh dockerscripts/healthcheck.sh /usr/bin/
COPY . /go/src/github.com/minio/minio
RUN \
RUN \
apk add --no-cache ca-certificates 'curl>7.61.0' && \
apk add --no-cache ca-certificates 'curl>7.61.0' && \
apk add --no-cache --virtual .build-deps git && \
echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf && \
echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf && \
cd /go/src/github.com/minio/minio && \
chmod +x /usr/bin/minio && \
go install -v -ldflags "$(go run buildscripts/gen-ldflags.go)" && \
chmod +x /usr/bin/docker-entrypoint.sh && \
rm -rf /go/pkg /go/src /usr/local/go && apk del .build-deps
chmod +x /usr/bin/healthcheck.sh
EXPOSE 9000
EXPOSE 9000