mirror of
https://github.com/certbot/certbot.git
synced 2026-01-19 13:24:57 +03:00
Originally, I had it in mind to move letsencrypt-auto inside this dir. However, now we'd like to copy it or link it to the root level, where people are used to finding it (at least for awhile). Since it would be confusing to have a letsencrypt-auto and a letsencrypt_auto right next to each other, we rename this folder.
69 lines
2.9 KiB
Plaintext
69 lines
2.9 KiB
Plaintext
# This Dockerfile builds an image for development.
|
|
FROM ubuntu:trusty
|
|
MAINTAINER Jakub Warmuz <jakub@warmuz.org>
|
|
MAINTAINER William Budington <bill@eff.org>
|
|
MAINTAINER Yan <yan@eff.org>
|
|
|
|
# Note: this only exposes the port to other docker containers. You
|
|
# still have to bind to 443@host at runtime, as per the ACME spec.
|
|
EXPOSE 443
|
|
|
|
# TODO: make sure --config-dir and --work-dir cannot be changed
|
|
# through the CLI (letsencrypt-docker wrapper that uses standalone
|
|
# authenticator and text mode only?)
|
|
VOLUME /etc/letsencrypt /var/lib/letsencrypt
|
|
|
|
WORKDIR /opt/letsencrypt
|
|
|
|
# no need to mkdir anything:
|
|
# https://docs.docker.com/reference/builder/#copy
|
|
# If <dest> doesn't exist, it is created along with all missing
|
|
# directories in its path.
|
|
|
|
# TODO: Install non-default Python versions for tox.
|
|
# TODO: Install Apache/Nginx for plugin development.
|
|
COPY letsencrypt-auto-source/letsencrypt-auto /opt/letsencrypt/src/letsencrypt-auto
|
|
RUN /opt/letsencrypt/src/letsencrypt-auto --os-packages-only && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/* \
|
|
/tmp/* \
|
|
/var/tmp/*
|
|
|
|
# the above is not likely to change, so by putting it further up the
|
|
# Dockerfile we make sure we cache as much as possible
|
|
|
|
COPY setup.py README.rst CHANGES.rst MANIFEST.in linter_plugin.py tox.cover.sh tox.ini pep8.travis.sh .pep8 .pylintrc /opt/letsencrypt/src/
|
|
|
|
# all above files are necessary for setup.py, however, package source
|
|
# code directory has to be copied separately to a subdirectory...
|
|
# https://docs.docker.com/reference/builder/#copy: "If <src> is a
|
|
# directory, the entire contents of the directory are copied,
|
|
# including filesystem metadata. Note: The directory itself is not
|
|
# copied, just its contents." Order again matters, three files are far
|
|
# more likely to be cached than the whole project directory
|
|
|
|
COPY letsencrypt /opt/letsencrypt/src/letsencrypt/
|
|
COPY acme /opt/letsencrypt/src/acme/
|
|
COPY letsencrypt-apache /opt/letsencrypt/src/letsencrypt-apache/
|
|
COPY letsencrypt-nginx /opt/letsencrypt/src/letsencrypt-nginx/
|
|
COPY letshelp-letsencrypt /opt/letsencrypt/src/letshelp-letsencrypt/
|
|
COPY letsencrypt-compatibility-test /opt/letsencrypt/src/letsencrypt-compatibility-test/
|
|
COPY tests /opt/letsencrypt/src/tests/
|
|
|
|
RUN virtualenv --no-site-packages -p python2 /opt/letsencrypt/venv && \
|
|
/opt/letsencrypt/venv/bin/pip install \
|
|
-e /opt/letsencrypt/src/acme \
|
|
-e /opt/letsencrypt/src \
|
|
-e /opt/letsencrypt/src/letsencrypt-apache \
|
|
-e /opt/letsencrypt/src/letsencrypt-nginx \
|
|
-e /opt/letsencrypt/src/letshelp-letsencrypt \
|
|
-e /opt/letsencrypt/src/letsencrypt-compatibility-test \
|
|
-e /opt/letsencrypt/src[dev,docs,testing]
|
|
|
|
# install in editable mode (-e) to save space: it's not possible to
|
|
# "rm -rf /opt/letsencrypt/src" (it's stays in the underlaying image);
|
|
# this might also help in debugging: you can "docker run --entrypoint
|
|
# bash" and investigate, apply patches, etc.
|
|
|
|
ENV PATH /opt/letsencrypt/venv/bin:$PATH
|