From 2fe8a75200b4ee85ec22cdb54e3f8760619bf953 Mon Sep 17 00:00:00 2001 From: William Budington Date: Tue, 19 May 2015 17:39:53 -0700 Subject: [PATCH] Use a discrete path for venv in docker, rather than /opt/letsencrypt. This is useful for the docker development container, which we will want venv to persist for across runs. --- Dockerfile | 6 +++--- docker-compose.yml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6fbc6d240..b6a07388c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,14 +48,14 @@ COPY letsencrypt_apache /opt/letsencrypt/src/letsencrypt_apache/ COPY letsencrypt_nginx /opt/letsencrypt/src/letsencrypt_nginx/ -RUN virtualenv --no-site-packages -p python2 /opt/letsencrypt && \ - /opt/letsencrypt/bin/pip install -e /opt/letsencrypt/src +RUN virtualenv --no-site-packages -p python2 /opt/letsencrypt/venv && \ + /opt/letsencrypt/venv/bin/pip install -e /opt/letsencrypt/src # 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/bin:$PATH +ENV PATH /opt/letsencrypt/venv/bin:$PATH # TODO: is --text really necessary? ENTRYPOINT [ "letsencrypt", "--text" ] diff --git a/docker-compose.yml b/docker-compose.yml index f7c071f1f..dbe6e4f01 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,3 +11,4 @@ development: - "443:443" volumes: - .:/opt/letsencrypt/src + - /opt/letsencrypt/venv