UNCLASSIFIED

You need to sign in or sign up before continuing.
Dockerfile 2.02 KB
Newer Older
1 2 3
ARG BASE_REGISTRY=registry1.dso.mil
ARG BASE_IMAGE=ironbank/opensource/python/python39
ARG BASE_TAG=v3.9
4
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
5 6
USER 0
ENV PATH /usr/local/bin:$PATH
David Freeman's avatar
David Freeman committed
7
COPY signatures/centos-gpg-key /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
8 9
COPY *.rpm /opt/dnfmodules/
COPY *.whl *.tar.gz /opt/pymodules/
David Freeman's avatar
David Freeman committed
10
COPY notary-Linux-amd64 /usr/local/bin/
11
ENV _BUILDAH_STARTED_IN_USERNS="" BUILDAH_ISOLATION=chroot PATH="${PATH}:/root/.local/bin"
David Freeman's avatar
David Freeman committed
12 13
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial && \
    dnf upgrade -y && \
14
    dnf install -y /opt/dnfmodules/*.rpm --setopt=tsflags=nodocs && \
15 16
    dnf install -y make gcc openssl-devel bzip2-devel \
        libffi-devel bc gettext git lsof rsync unzip \
David Freeman's avatar
David Freeman committed
17 18 19 20 21
        zip bzip2 jq gcc-c++ \
        --setopt=tsflags=nodocs && \
    mv /usr/local/bin/notary-Linux-amd64 /usr/local/bin/notary && \
    chmod 755 /usr/local/bin/notary && \
    rm /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial && \
22 23 24 25 26 27 28 29 30 31
    rm -rf /opt/dnfmodules && \
    chmod -s /usr/libexec/openssh/ssh-keysign && \
    dnf clean all && \
    rm -rf /var/cache/dnf 
RUN python3 -m pip install --upgrade /opt/pymodules/pip-21.1.1-py3-none-any.whl
RUN python3 -m pip install /opt/pymodules/wheel-0.36.2-py2.py3-none-any.whl /opt/pymodules/setuptools-56.1.0-py3-none-any.whl && \
        rm -f /opt/pymodules/pip-21.1.1-py3-none-any.whl /opt/pymodules/wheel-0.36.2-py2.py3-none-any.whl /opt/pymodules/setuptools-56.1.0-py3-none-any.whl 
RUN python3 -m pip install /opt/pymodules/numpy-1.20.2-cp39-cp39-manylinux2010_x86_64.whl && rm -f /opt/pymodules/numpy-1.20.2-cp39-cp39-manylinux2010_x86_64.whl && \   
        python3 -m pip install /opt/pymodules/* && \
        rm -rf /opt/pymodules
Kenneth Maguire's avatar
Kenneth Maguire committed
32
RUN dnf -y remove gcc make openssl-devel bzip2-devel libffi-devel && \
33
    dnf clean all && \
Kenneth Maguire's avatar
Kenneth Maguire committed
34 35
    rm -rf /var/cache/dnf && \
    sed -i 's/driver = "overlay"/driver = "vfs"/g' /etc/containers/storage.conf
36
HEALTHCHECK none
37 38
RUN find / -path /proc -prune -o -perm /4000 -exec chmod u-s {} \;
RUN find / -path /proc -prune -o -perm /2000 -exec chmod g-s {} \;