-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
37 lines (26 loc) · 1.19 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
FROM debian:bullseye-slim
ARG UID=1001
ARG GID=1001
LABEL maintainer="[email protected]"
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y java-common python3 python3-venv python3-pip wget libpq-dev git && \
groupadd -g "${GID}" anvil && \
useradd --create-home --no-log-init -u "${UID}" -g "${GID}" anvil && \
mkdir /home/anvil/anvil_data && \
chown -R anvil:anvil /home/anvil
RUN wget https://corretto.aws/downloads/latest/amazon-corretto-11-x64-linux-jdk.deb && \
dpkg -i amazon-corretto-11-x64-linux-jdk.deb && \
rm amazon-corretto-11-x64-linux-jdk.deb
USER anvil:anvil
WORKDIR /home/anvil
RUN git clone https://github.com/jonp92/Milliner.git && \
python3 -m venv /home/anvil/.anvil_app && \
/home/anvil/.anvil_app/bin/pip install -U pip && \
/home/anvil/.anvil_app/bin/pip install anvil-app-server python-dateutil bcrypt && \
rm -rf /home/anvil/.cache/pip && \
/home/anvil/.anvil_app/bin/anvil-app-server || true
VOLUME ["/home/anvil/anvil_data"]
EXPOSE 3030
CMD ["--port", "3030"]
ENTRYPOINT ["/home/anvil/.anvil_app/bin/anvil-app-server", "--app", "/home/anvil/Milliner", "--auto-migrate", "--data-dir=/home/anvil/anvil_data"]