Skip to content

Commit

Permalink
Use a discrete path for venv in docker, rather than /opt/letsencrypt.
Browse files Browse the repository at this point in the history
This is useful for the docker development container, which we will want
venv to persist for across runs.
  • Loading branch information
Hainish committed May 20, 2015
1 parent e4e4c69 commit 2fe8a75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ development:
- "443:443"
volumes:
- .:/opt/letsencrypt/src
- /opt/letsencrypt/venv

0 comments on commit 2fe8a75

Please sign in to comment.