-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (39 loc) · 1.38 KB
/
Dockerfile
File metadata and controls
42 lines (39 loc) · 1.38 KB
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
41
42
FROM quay.io/deis/base:v0.3.4
COPY . /
RUN buildDeps='git golang make'; \
apt-get update && \
apt-get install -y --no-install-recommends \
$buildDeps && \
export DOCKER_REGISTRY_TAG=deis \
DOCKER_REGISTRY_REPO=https://github.com/deis/distribution.git \
DISTRIBUTION_DIR=/go/src/github.com/docker/distribution && \
export GOPATH=/go:$DISTRIBUTION_DIR/Godeps/_workspace && \
git clone -b $DOCKER_REGISTRY_TAG --single-branch $DOCKER_REGISTRY_REPO $DISTRIBUTION_DIR && \
cd $DISTRIBUTION_DIR && \
make binaries && \
cp bin/* /bin/ && \
rm -rf /go && \
# cleanup
apt-get purge -y --auto-remove $buildDeps && \
apt-get autoremove -y && \
apt-get clean -y && \
# package up license files if any by appending to existing tar
COPYRIGHT_TAR='/usr/share/copyrights.tar'; \
gunzip $COPYRIGHT_TAR.gz; tar -rf $COPYRIGHT_TAR /usr/share/doc/*/copyright; gzip $COPYRIGHT_TAR && \
rm -rf \
/usr/share/doc \
/usr/share/man \
/usr/share/info \
/usr/share/locale \
/var/lib/apt/lists/* \
/var/log/* \
/var/cache/debconf/* \
/etc/systemd \
/lib/lsb \
/lib/udev \
/usr/lib/x86_64-linux-gnu/gconv/IBM* \
/usr/lib/x86_64-linux-gnu/gconv/EBC* && \
bash -c "mkdir -p /usr/share/man/man{1..8}"
VOLUME ["/var/lib/registry"]
CMD ["/opt/registry/sbin/registry"]
EXPOSE 5000