"Fossies" - the Fresh Open Source Software Archive

Member "certbot-0.35.1/letsencrypt-auto-source/Dockerfile.xenial" (10 Jun 2019, 1014 Bytes) of package /linux/privat/certbot-0.35.1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # For running tests, build a docker image with a passwordless sudo and a trust
    2 # store we can manipulate.
    3 
    4 FROM ubuntu:xenial
    5 
    6 # Add an unprivileged user:
    7 RUN useradd --create-home --home-dir /home/lea --shell /bin/bash --groups sudo --uid 1000 lea
    8 
    9 # Install pip, sudo, and openssl:
   10 RUN apt-get update && \
   11     apt-get -q -y install python-pip sudo openssl && \
   12     apt-get clean
   13 
   14 # Use pipstrap to update to a stable and tested version of pip
   15 COPY ./pieces/pipstrap.py /opt
   16 RUN /opt/pipstrap.py
   17 # Pin pytest version for increased stability
   18 RUN pip install pytest==3.2.5 six==1.10.0
   19 
   20 # Let that user sudo:
   21 RUN sed -i.bkp -e \
   22       's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' \
   23       /etc/sudoers
   24 
   25 RUN mkdir -p /home/lea/certbot
   26 
   27 # Install fake testing CA:
   28 COPY ./tests/certs/ca/my-root-ca.crt.pem /usr/local/share/ca-certificates/
   29 
   30 # Copy code:
   31 COPY . /home/lea/certbot/letsencrypt-auto-source
   32 
   33 USER lea
   34 WORKDIR /home/lea
   35 
   36 CMD ["pytest", "-v", "-s", "certbot/letsencrypt-auto-source/tests"]