-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (36 loc) · 1.53 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
44
45
46
47
48
49
50
51
ARG TAG=3.10-slim
FROM python:${TAG}
ARG CONTAINER_USER="python"
ARG LANGUAGE_CODE="en"
ARG COUNTRY_CODE="GB"
ARG ENCODING="UTF-8"
ARG LOCALE_STRING="${LANGUAGE_CODE}_${COUNTRY_CODE}"
ARG LOCALIZATION="${LOCALE_STRING}.${ENCODING}"
ARG OH_MY_ZSH_THEME="bira"
RUN apt update && apt -y upgrade && \
apt -y install \
locales \
git \
curl \
inotify-tools \
zsh && \
echo "${LOCALIZATION} ${ENCODING}" > /etc/locale.gen && \
locale-gen "${LOCALIZATION}" && \
useradd -m -u 1000 -s /usr/bin/zsh "${CONTAINER_USER}" && \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" && \
cp -v /root/.zshrc /home/"${CONTAINER_USER}"/.zshrc && \
cp -rv /root/.oh-my-zsh /home/"${CONTAINER_USER}"/.oh-my-zsh && \
sed -i "s/\/root/\/home\/${CONTAINER_USER}/g" /home/"${CONTAINER_USER}"/.zshrc && \
sed -i s/ZSH_THEME=\"robbyrussell\"/ZSH_THEME=\"${OH_MY_ZSH_THEME}\"/g /home/${CONTAINER_USER}/.zshrc && \
mkdir /home/"${CONTAINER_USER}"/workspace && \
chown -R "${CONTAINER_USER}":"${CONTAINER_USER}" /home/"${CONTAINER_USER}"
USER ${CONTAINER_USER}
ENV USER ${CONTAINER_USER}
ENV LANG "${LOCALIZATION}"
ENV LANGUAGE "${LOCALE_STRING}:${LANGUAGE_CODE}"
ENV PATH=/home/${CONTAINER_USER}/.local/bin:${PATH}
ENV LC_ALL "${LOCALIZATION}"
WORKDIR /home/${CONTAINER_USER}/workspace
ADD ./src/approov-protected-server/token-check/requirements.txt .
RUN pip3 install -r requirements.txt
CMD ["zsh"]