Pull changes from upstream repository.

This commit is contained in:
Marek Skalický 2018-10-26 13:00:46 +01:00
commit 8986aed360
No known key found for this signature in database
GPG key ID: ADCAA1DEE100A66D
28 changed files with 2263 additions and 130 deletions

View file

@ -1,6 +1,6 @@
# This image provides a Python 3.5 environment you can use to run your Python
# This image provides a Python 3.6 environment you can use to run your Python
# applications.
FROM registry.fedoraproject.org/f26/s2i-base:latest
FROM registry.fedoraproject.org/f27/s2i-base:latest
EXPOSE 8080
@ -18,7 +18,7 @@ ENV NAME=python3 \
ARCH=x86_64
ENV SUMMARY="Platform for building and running Python $PYTHON_VERSION applications" \
DESCRIPTION="Python $PYTHON_VERSION available as docker container is a base platform for \
DESCRIPTION="Python $PYTHON_VERSION available as container is a base platform for \
building and running various Python $PYTHON_VERSION applications and frameworks. \
Python is an easy to learn, powerful programming language. It has efficient high-level \
data structures and a simple but effective approach to object-oriented programming. \
@ -36,15 +36,15 @@ LABEL summary="$SUMMARY" \
name="$FGC/$NAME" \
version="$VERSION" \
release="$RELEASE.$DISTTAG" \
architecture="$ARCH" \
usage="s2i build file:///your/app 26/python3 your-app" \
usage="s2i build https://github.com/sclorg/s2i-python-container.git --context-dir=3.6/test/setup-test-app/ $FGC/$NAME python-sample-app" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"
RUN INSTALL_PKGS="python3 python3-devel python3-setuptools python3-pip python3-virtualenv \
nss_wrapper httpd httpd-devel atlas-devel gcc-gfortran libffi-devel libtool-ltdl" && \
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
nss_wrapper httpd httpd-devel atlas-devel gcc-gfortran \
libffi-devel libtool-ltdl enchant" && \
dnf -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
dnf clean all -y
dnf -y clean all --enablerepo='*'
# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH.
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
@ -52,15 +52,21 @@ COPY ./s2i/bin/ $STI_SCRIPTS_PATH
# Copy extra files to the image.
COPY ./root/ /
# Create a Python virtual environment for use by any application to avoid
# potential conflicts with Python packages preinstalled in the main Python
# installation.
RUN virtualenv-$PYTHON_VERSION /opt/app-root
# - Create a Python virtual environment for use by any application to avoid
# potential conflicts with Python packages preinstalled in the main Python
# installation.
# - In order to drop the root user, we have to make some directories world
# writable as OpenShift default security model is to run the container
# under random UID.
RUN virtualenv-$PYTHON_VERSION ${APP_ROOT} && \
chown -R 1001:0 ${APP_ROOT} && \
fix-permissions ${APP_ROOT} -P
# In order to drop the root user, we have to make some directories world
# writable as OpenShift default security model is to run the container under
# random UID.
RUN chown -R 1001:0 /opt/app-root && chmod -R og+rwx /opt/app-root
# For Fedora scl_enable isn't sourced automatically in s2i-core
# so virtualenv needs to be activated this way
ENV BASH_ENV="${APP_ROOT}/bin/activate" \
ENV="${APP_ROOT}/bin/activate" \
PROMPT_COMMAND=". ${APP_ROOT}/bin/activate"
USER 1001