This repository has been archived by the owner on Jan 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (31 loc) · 1.57 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
34
35
36
37
38
39
40
#------------------------------------------------------------------------------
# Set the base image for subsequent instructions:
#------------------------------------------------------------------------------
FROM alpine:3.6
MAINTAINER Marc Villacorta Morera <marc.villacorta@gmail.com>
#------------------------------------------------------------------------------
# Environment variables:
#------------------------------------------------------------------------------
ENV GOPATH="/go" \
VERSION="2.6.1"
#------------------------------------------------------------------------------
# Install:
#------------------------------------------------------------------------------
RUN apk add --no-cache -U -t deps go git make musl-dev \
&& apk add --no-cache -U bash libressl ca-certificates \
&& go get github.com/docker/distribution \
&& cd ${GOPATH}/src/github.com/docker/distribution \
&& git checkout tags/v${VERSION} -b build \
&& make PREFIX=/usr clean binaries && mkdir /var/lib/registry \
&& apk del --purge deps && rm -rf /go /tmp/* /var/cache/apk/* \
&& rm -f /usr/bin/registry-api-descriptor-template \
&& rm -f /usr/bin/digest
#------------------------------------------------------------------------------
# Populate root file system:
#------------------------------------------------------------------------------
ADD rootfs /
#------------------------------------------------------------------------------
# Expose ports and entrypoint:
#------------------------------------------------------------------------------
EXPOSE 5000
ENTRYPOINT ["/init"]