FROM harbor.dragse.it/base/alpine:3.15 LABEL maintainer="Lennard Brinkhaus " RUN echo $'http://nexus.dragse.it/repository/apk-main/\nhttp://nexus.dragse.it/repository/apk-community/' > /etc/apk/repositories RUN apk --no-cache upgrade \ && apk --no-cache add ca-certificates wget openssl \ && update-ca-certificates # set version label ARG NETBOX_RELEASE="v3.1.5" RUN echo "**** install runtime packages ****" && \ apk add --no-cache --upgrade \ postgresql-client \ py3-pillow \ py3-setuptools \ python3 \ uwsgi \ uwsgi-python RUN \ echo "**** install build packages ****" && \ apk add --no-cache --upgrade --virtual=build-dependencies \ curl \ cargo \ gcc \ git \ jpeg-dev \ libffi-dev \ libxslt-dev \ libxml2-dev \ musl-dev \ openssl-dev \ postgresql-dev \ python3-dev \ zlib-dev && \ echo "**** install netbox ****" && \ mkdir -p /app/netbox && \ if [ -z ${NETBOX_RELEASE+x} ]; then \ NETBOX_RELEASE=$(curl -sX GET "https://api.github.com/repos/netbox-community/netbox/releases/latest" \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \ fi && \ curl -o \ /tmp/netbox.tar.gz -L \ "https://github.com/netbox-community/netbox/archive/${NETBOX_RELEASE}.tar.gz" && \ tar xf \ /tmp/netbox.tar.gz -C \ /app/netbox/ --strip-components=1 && \ echo "**** install pip packages ****" && \ python3 -m ensurepip && \ rm -rf /usr/lib/python*/ensurepip && \ cd /app/netbox && \ pip3 install --no-cache-dir -U pip wheel && \ pip3 install --no-cache-dir --ignore-installed --find-links https://wheel-index.linuxserver.io/alpine/ -r requirements.txt && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ rm -rf \ /tmp/* \ ${HOME}/.cargo \ ${HOME}/.cache # copy local files COPY root/ / # ports and volumes EXPOSE 8000 VOLUME /config