-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (24 loc) · 1.01 KB
/
Dockerfile
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
FROM python:bullseye
ARG USERNAME=kyle
ARG USER_UID=1000
ARG USER_GID=$USER_UID
# Create the user
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
#
# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
&& apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
# ********************************************************
# * Anything else you want to do like clean up goes here *
# ********************************************************
# [Optional] Set the default user. Omit if you want to keep the default as root.
USER $USERNAME
ENV SHELL /bin/bash
RUN sudo apt update && sudo apt full-upgrade -y
RUN sudo apt install python3-pip python3-venv build-essential htop nano nload wget curl -y
RUN pip3 install -U pip
RUN sudo chsh -s /bin/bash
RUN echo 'export PATH="$PATH:/home/kyle/.local/bin"' >> ~/.bashrc