Rely on alpine packages for available python modules

This commit is contained in:
cimnine 2021-09-18 00:21:53 +02:00
parent 70b7f0ada1
commit e7c504eb08
1 changed files with 38 additions and 5 deletions

View File

@ -4,7 +4,6 @@ FROM ${FROM} as builder
RUN apk add --no-cache \ RUN apk add --no-cache \
bash \ bash \
build-base \ build-base \
cargo \
ca-certificates \ ca-certificates \
cmake \ cmake \
cyrus-sasl-dev \ cyrus-sasl-dev \
@ -14,14 +13,33 @@ RUN apk add --no-cache \
libevent-dev \ libevent-dev \
libffi-dev \ libffi-dev \
libxslt-dev \ libxslt-dev \
libxml2-dev \
make \ make \
musl-dev \ musl-dev \
openldap-dev \ openldap-dev \
openssl-dev \ openssl-dev \
postgresql-dev \ postgresql-dev \
py3-bcrypt \
py3-cffi \
py3-coreschema \
py3-cryptography \
py3-future \
py3-idna \
py3-jinja2 \
py3-markdown \
py3-netaddr \
py3-pillow \
py3-pip \ py3-pip \
python3-dev \ py3-psycopg2 \
&& python3 -m venv /opt/netbox/venv \ py3-pycryptodome \
py3-pynacl \
py3-pyrsistent \
py3-ruamel.yaml.clib \
py3-watchdog \
py3-yaml \
python3-dev
RUN python3 -m venv --system-site-packages /opt/netbox/venv \
&& /opt/netbox/venv/bin/python3 -m pip install --upgrade \ && /opt/netbox/venv/bin/python3 -m pip install --upgrade \
pip \ pip \
setuptools \ setuptools \
@ -57,7 +75,6 @@ FROM ${FROM} as main
RUN apk add --no-cache \ RUN apk add --no-cache \
bash \ bash \
ca-certificates \ ca-certificates \
cargo \
curl \ curl \
graphviz \ graphviz \
libevent \ libevent \
@ -67,9 +84,25 @@ RUN apk add --no-cache \
libxml2 \ libxml2 \
openssl \ openssl \
postgresql-libs \ postgresql-libs \
py3-bcrypt \
py3-cffi \
py3-coreschema \
py3-cryptography \
py3-future \
py3-idna \
py3-jinja2 \
py3-markdown \
py3-netaddr \
py3-pillow \
py3-pip \ py3-pip \
py3-psycopg2 \
py3-pycryptodome \
py3-pynacl \
py3-pyrsistent \
py3-ruamel.yaml.clib \
py3-watchdog \
py3-yaml \
python3 \ python3 \
rust \
tini \ tini \
unit \ unit \
unit-python3 unit-python3