Simplify Dockerfile to cache building layers
This commit is contained in:
parent
50c4036c73
commit
fae2033061
44
Dockerfile
44
Dockerfile
@ -1,21 +1,37 @@
|
|||||||
FROM python:3.10
|
FROM python:3.10
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
RUN apt update \
|
|
||||||
&& wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb \
|
# Initial apt install
|
||||||
&& dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb \
|
RUN apt update
|
||||||
&& apt install redis libgtk-4-1 libvulkan1 libxdamage1 -y \
|
RUN apt install -y libgtk-4-1 libvulkan1 libxdamage1 \
|
||||||
&& curl -sSLO https://nc.piair.xyz/s/BKLsBWoZkTdYjfq/download/chrome.deb \
|
novnc websockify xvfb nginx nano tzdata \
|
||||||
&& ln -fs /usr/share/zoneinfo/Europe/Paris /etc/localtime \
|
sqlite3 apt-transport-https software-properties-common \
|
||||||
&& git clone https://gitea.augustin64.fr/piair/MsRewards-Reborn \
|
wget wfrench tigervnc-standalone-server libasound2 \
|
||||||
&& python3 -m pip install -r MsRewards-Reborn/requirements.txt \
|
libatk-bridge2.0-0 libnss3 libnspr4 xvfb libgbm1 libatk1.0-0 \
|
||||||
&& wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key \
|
libu2f-udev libatspi2.0-0 libcups2 libxkbcommon0 libxrandr2 \
|
||||||
&& curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg \
|
libdbus-1-3 xdg-utils fonts-liberation libdrm2
|
||||||
&& echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | tee -a /etc/apt/sources.list.d/grafana.list \
|
|
||||||
&& apt update \
|
# Additional repos and packages
|
||||||
&& apt install novnc websockify grafana xvfb nginx nano tzdata sqlite3 apt-transport-https software-properties-common wget wfrench tigervnc-standalone-server libasound2 libatk-bridge2.0-0 libnss3 libnspr4 xvfb libgbm1 libatk1.0-0 libu2f-udev libatspi2.0-0 libcups2 libxkbcommon0 libxrandr2 libdbus-1-3 xdg-utils fonts-liberation libdrm2 -y \
|
RUN wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb \
|
||||||
&& bash MsRewards-Reborn/config/config.sh \
|
&& dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
|
||||||
|
RUN curl -sSLO https://nc.piair.xyz/s/BKLsBWoZkTdYjfq/download/chrome.deb \
|
||||||
&& dpkg -i chrome.deb
|
&& dpkg -i chrome.deb
|
||||||
|
RUN ln -fs /usr/share/zoneinfo/Europe/Paris /etc/localtime
|
||||||
|
RUN wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key \
|
||||||
|
&& echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | tee -a /etc/apt/sources.list.d/grafana.list
|
||||||
|
RUN curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
|
||||||
|
# Install from new repo
|
||||||
|
RUN apt update \
|
||||||
|
&& apt install -y redis grafana
|
||||||
|
|
||||||
|
# Setup app
|
||||||
|
RUN git clone https://gitea.augustin64.fr/piair/MsRewards-Reborn
|
||||||
|
# Use this instead when developping locally:
|
||||||
|
# COPY . /app/MsRewards-Reborn
|
||||||
|
|
||||||
|
RUN python3 -m pip install -r MsRewards-Reborn/requirements.txt
|
||||||
|
RUN bash MsRewards-Reborn/config/config.sh
|
||||||
|
|
||||||
ENV TZ="Europe/Paris"
|
ENV TZ="Europe/Paris"
|
||||||
WORKDIR /app/MsRewards-Reborn/Flask/
|
WORKDIR /app/MsRewards-Reborn/Flask/
|
||||||
|
3
build.sh
3
build.sh
@ -1 +1,2 @@
|
|||||||
sudo docker build --no-cache --network host -t msrewards . && sudo docker run -d --restart unless-stopped -p 1234:1234 -p 2345:2345 -ti --shm-size=2gb --name MsRewards msrewards
|
docker build --network host -t msrewards .
|
||||||
|
docker run -d --restart unless-stopped -p 1234:1234 -p 2345:2345 -ti --shm-size=2gb --name MsRewards msrewards
|
||||||
|
Loading…
Reference in New Issue
Block a user