-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile.update
48 lines (37 loc) · 1.69 KB
/
Dockerfile.update
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
FROM art-dash-server:base
# This build is meant to be based on an existing build and
# update just doozer, elliott, and art-dash.
# Use same non-root user from the initial install
ARG USERNAME=dev
# On Linux, replace with your actual UID, GID if not the default 1000
ARG USER_UID=1000
ARG USER_GID=$USER_UID
# Since art-dash-server:base is set as dev user, we need to switch back to root
USER 0
# install default configs
COPY container/doozer-settings.yaml /home/"$USERNAME"/.config/doozer/settings.yaml
COPY container/elliott-settings.yaml /home/"$USERNAME"/.config/elliott/settings.yaml
# If you want to run with an ssh server (for debugging in vscode), uncomment these four lines
# RUN dnf install -y openssh-server && \
# ssh-keygen -A && \
# sed -i 's/#Port 22/Port 22/' /etc/ssh/sshd_config && \
# sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config
# Switching back to default user
USER "$USER_UID"
WORKDIR /workspaces/art-dash
# If you want to run with an ssh server (for debugging in vscode), uncomment these three lines after adding a the launch.json
# RUN mkdir .vscode
# RUN sudo chmod a+rw .vscode
# COPY launch.json .vscode
# Upadate pip
RUN python3 -m pip install --upgrade pip
COPY requirements.txt ./
RUN pip3 install --upgrade -r requirements.txt \
&& rm requirements.txt # We need to manually remove since we copied using COPY
# Clone art-tools and install
RUN cd art-tools \
&& git pull \
&& pip3 install -e artcommon/ -e doozer/ -e elliott/ -e pyartcd/ -e ocp-build-data-validator/
COPY . .
# Start server
CMD ["sh", "-c", "python3 manage.py makemigrations && python3 manage.py migrate && python3 manage.py runserver 0.0.0.0:8080 --noreload"]