-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·69 lines (58 loc) · 1.76 KB
/
Dockerfile
File metadata and controls
executable file
·69 lines (58 loc) · 1.76 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM python:3.9.11-slim-bullseye
ARG DEBIAN_FRONTEND=noninteractive
ARG USER=user
ENV container docker
USER root
# Create non-root user
RUN groupadd $USER && useradd --gid $USER --shell /bin/bash --create-home $USER
RUN apt-get update &&\
apt-get install --assume-yes --no-install-recommends -y\
build-essential\
ca-certificates\
curl\
git-all\
less\
nano\
rsync\
gnupg\
gnupg2\
gnupg1\
sqlite3\
jq\
vim\
nano\
htop\
procps\
wget\
zsh\
git-lfs\
graphviz
# Install basic packages
RUN curl -k https://packages.microsoft.com/keys/microsoft.asc | apt-key add -\
&& curl -k https://packages.microsoft.com/config/debian/11/prod.list > /etc/apt/sources.list.d/mssql-release.list\
&& apt-get update\
&& ACCEPT_EULA=Y apt-get install --assume-yes --no-install-recommends -y\
msodbcsql17\
mssql-tools\
unixodbc-dev\
libgssapi-krb5-2\
&& apt-get clean\
&& rm -rf /var/lib/apt/lists/*
# Add mssq application to .bashrc
RUN echo "export PATH='$PATH:/opt/mssql-tools/bin'" >> /home/$USER/.bash_profile\
&& echo "export PATH='$PATH:/opt/mssql-tools/bin'" >> /home/$USER/.bashrc
# RUN echo "Install Conda..."\
# && cd /tmp\
# && curl https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh --progress-bar -o installer.sh\
# && bash installer.sh -b -p $HOME/anaconda3\
# && rm installer.sh\
# && conda install -c conda-forge mamba
# Upgrade pip then install poetry and wheel
RUN pip3 install --no-cache-dir --upgrade pip \
&& pip3 install --no-cache-dir wheel poetry==1.6.0
# Install oh-my-zsh
RUN yes Y | sh -c "$(curl -k -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
COPY .devcontainer/config_devcontainer.sh /tmp
COPY --chown=$USER:$USER . /home/$USER/python_learning
WORKDIR /home/$USER/python_learning
USER $USER