Pull changes from upstream repository.
This commit is contained in:
parent
ff46c0a1f0
commit
8de2f6ec06
28 changed files with 2262 additions and 129 deletions
36
Dockerfile
36
Dockerfile
|
|
@ -1,4 +1,4 @@
|
|||
# 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/f28/s2i-base:latest
|
||||
|
||||
|
|
@ -17,7 +17,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. \
|
||||
|
|
@ -34,15 +34,15 @@ LABEL summary="$SUMMARY" \
|
|||
com.redhat.component="$NAME" \
|
||||
name="$FGC/$NAME" \
|
||||
version="$VERSION" \
|
||||
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
|
||||
|
|
@ -50,15 +50,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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue