-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
43 lines (32 loc) · 1.06 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM python:3.10
RUN apt update \
&& apt install -y \
g++ gcc make sqlite3 time curl git nano dos2unix \
net-tools iputils-ping iproute2 sudo gdb less \
&& apt clean;
ARG USER=user
ARG UID=1000
ARG GID=1000
# Set environment variables
ENV USER ${USER}
ENV HOME /home/${USER}
# Create user and setup permissions on /etc/sudoers
RUN useradd -m -s /bin/bash -N -u $UID $USER && \
echo "${USER} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers && \
chmod 0440 /etc/sudoers && \
chmod g+w /etc/passwd
WORKDIR ${HOME}
RUN pip install --upgrade pip
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Install zsh - use "Bira" theme with some customization.
RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.5/zsh-in-docker.sh)" -- \
-t bira \
-p git \
-p ssh-agent \
-p https://github.com/zsh-users/zsh-autosuggestions \
-p https://github.com/zsh-users/zsh-completions
# Install heroku cli
RUN curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
USER user
CMD zsh