aft-may25-2023/Dockerfile

32 lines
1.1 KiB
Docker
Raw Permalink Normal View History

2023-05-24 19:05:16 -06:00
FROM sjkillen/miktex
LABEL maintainer="sjkillen@ualberta.ca"
RUN apt-get -qq update
RUN apt-get -qq install sudo git wget default-jre
RUN apt-get -qq install software-properties-common
RUN add-apt-repository -y ppa:deadsnakes/ppa
RUN apt-get -qq install python3.11
RUN rm /usr/bin/python3
RUN ln -sT /usr/bin/python3.11 /usr/bin/python3
RUN ln -sT /usr/bin/python3.11 /usr/bin/python
RUN cd /tmp && wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py
ARG USERNAME=user
ARG USER_UID=1000
ARG USER_GID=$USER_UID
# Copied from https://code.visualstudio.com/docs/remote/containers-advanced#_adding-a-nonroot-user-to-your-dev-container
# Create the user
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME --shell /bin/bash \
# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
RUN chown -R $USERNAME:$USERNAME /miktex
USER $USERNAME
COPY requirements.txt /tmp/
RUN python -m pip install -r /tmp/requirements.txt