forked from maxmilianr/altafplotter_public
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
61 lines (47 loc) · 1.94 KB
/
dockerfile
File metadata and controls
61 lines (47 loc) · 1.94 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
FROM docker.io/phusion/baseimage:jammy-1.0.1
# Set bash
RUN rm /bin/sh && \
ln -s /bin/bash /bin/sh
# Add UKL Certificates
# Update System
RUN apt-get update && \
apt-get upgrade -y && \
rm -rf /var/lib/apt/lists/* && \
apt-get autoclean
# Unattended Upgrades
ARG packagesToInstallForUnattendedUpgrades="unattended-upgrades"
RUN apt-get update && \
apt-get install --no-install-recommends -y ${packagesToInstallForUnattendedUpgrades} && \
rm -rf /var/lib/apt/lists/* && \
apt-get autoclean && \
sed -i -e 's|//Unattended-Upgrade::Mail "";|Unattended-Upgrade::Mail "root";|g' \
-e 's|//Unattended-Upgrade::MailReport "on-change";|Unattended-Upgrade::MailReport "on-change";|g' \
-e 's|//Unattended-Upgrade::Remove-Unused-Dependencies "false";|Unattended-Upgrade::Remove-Unused-Dependencies "true";|g' \
/etc/apt/apt.conf.d/50unattended-upgrades
# Streamlit App
## Packages
ARG packagesToInstallForStreamlit="python3.10-venv python3 supervisor git tabix bcftools"
RUN apt-get update && \
apt-get install --no-install-recommends -y ${packagesToInstallForStreamlit} && \
rm -rf /var/lib/apt/lists/* && \
apt-get autoclean
## Supervisor
RUN useradd -ms /bin/bash streamlit
COPY ./docker/supervisor_streamlit.conf /etc/supervisor/conf.d/streamlit.conf
## App
COPY ./source/ /usr/local/bin/StreamlitApp
WORKDIR /usr/local/bin/StreamlitApp
RUN python3 -m venv /usr/local/bin/streamlit_env && \
source /usr/local/bin/streamlit_env/bin/activate && \
pip install wheel && \
pip install -r requirements.txt
# Add version to file from build argument
ARG VERSION
RUN echo ${VERSION} > /usr/local/bin/StreamlitApp/VERSION
CMD /etc/init.d/cron start && \
touch /var/log/altafplotter.log && \
chown streamlit:streamlit /var/log/altafplotter.log && \
mkdir -p /var/log/supervisor && \
chown -R streamlit:streamlit /var/log/supervisor && \
/usr/bin/supervisord && \
bash