1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
FROM ubuntu:focal-20200319
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
arj \
cpio \
gzip \
lhasa \
libffi-dev \
lrzip \
lzip \
p7zip-full \
python-pip-whl \
python2.7 \
python3-pip \
python3.8 \
unrar \
wget \
zip
# Install the python versions
RUN \
apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && apt-get update && \
bash -c "\
apt-get install -y \
python2.7{,-dev} \
python3.6{,-dev} \
python3.7{,-dev,-distutils} \
python3.8{,-dev} \
python3.9{,-dev,-distutils}\
python3-distutils"
# create a user inside the container. if you specify your UID when building the
# image, you can mount directories into the container with read-write access:
# docker build -t "dtrx" -f Dockerfile --build-arg UID=$(id -u) .
ARG UID=1010
ARG UNAME=builder
RUN useradd --uid ${UID} --create-home --user-group ${UNAME} && \
echo "${UNAME}:${UNAME}" | chpasswd && adduser ${UNAME} sudo
ENV PATH=${PATH}:/home/${UNAME}/.local/bin
USER ${UNAME}
# Need tox to run the tests, docutils for rst2man.py
RUN pip3 install tox==3.15.2 docutils==0.16
WORKDIR /mnt/workspace
|