-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathContainerfile
37 lines (27 loc) · 1.09 KB
/
Containerfile
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 docker.io/python:3.10-slim
EXPOSE 8080
RUN apt-get update && \
apt-get install -y build-essential \
libxml2-dev \
libxslt1-dev \
libffi-dev \
libpq-dev \
libssl-dev \
zlib1g-dev
COPY netbox/requirements.txt /opt/netbox/requirements.txt
COPY local_requirements.txt /opt/netbox/local_requirements.txt
RUN pip install django-storages
RUN pip install -r /opt/netbox/requirements.txt
RUN pip install -r /opt/netbox/local_requirements.txt
COPY netbox /opt/netbox
COPY oidc_groups.py /opt/netbox/netbox/oidc_groups.py
COPY validators.py /opt/netbox/netbox/netbox/validators.py
COPY configuration.env.py /opt/netbox/netbox/netbox/configuration.py
COPY gunicorn.py /opt/netbox/gunicorn.py
COPY migrate.sh /opt/netbox/migrate.sh
WORKDIR /opt/netbox
RUN NETBOX_SECRET_KEY="6l0~ZBT9yFIQoZxak9H=N_f6~@Yhbu~YS4s6r8-R2%GwXZVV)0" mkdocs build && \
NETBOX_SECRET_KEY="6l0~ZBT9yFIQoZxak9H=N_f6~@Yhbu~YS4s6r8-R2%GwXZVV)0" \
python3 netbox/manage.py collectstatic --no-input
USER 1069
ENTRYPOINT [ "gunicorn", "--config", "/opt/netbox/gunicorn.py", "--pythonpath", "/opt/netbox/netbox", "netbox.wsgi" ]