Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit 8e1f742

Browse files
committed
Enable TLS by default if /ssl directory is present.
Generates needed keys and certs. If only one element in the key/cert pair is present, nothing is overriden; instead, the user is asked to either remove the existing element, or put the missing one back. Uses TLSv1, since TLSv1.1 nor TLSv1.2 are available in the current version of python 2.7. Usage: docker run -d -p 5000:5000 -v /etc/docker/certs.d:/ssl registry There are no breaking changes, since the /ssl directory is not present by default. Signed-off-by: Tibor Vass <[email protected]>
1 parent 14796be commit 8e1f742

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@ FROM ubuntu:14.04
1212
RUN apt-get update \
1313
# Install pip
1414
&& apt-get install -y \
15+
curl \
1516
python-pip \
1617
# Install deps for backports.lmza (python2 requires it)
1718
python-dev \
1819
liblzma-dev \
1920
libevent1-dev \
2021
&& rm -rf /var/lib/apt/lists/*
2122

23+
# get generate_cert
24+
RUN curl -L -o /usr/local/bin/generate_cert https://github.com/SvenDowideit/generate_cert/releases/download/0.1/generate_cert-0.1-linux-amd64/ && \
25+
chmod +x /usr/local/bin/generate_cert
26+
2227
COPY . /docker-registry
2328
COPY ./config/boto.cfg /etc/boto.cfg
2429

@@ -37,4 +42,5 @@ ENV SETTINGS_FLAVOR dev
3742

3843
EXPOSE 5000
3944

45+
ENTRYPOINT ["/docker-registry/wrap.sh"]
4046
CMD ["docker-registry"]

0 commit comments

Comments
 (0)