UNCLASSIFIED - NO CUI
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python38
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Iron Bank Containers
Opensource
python
python38
Merge requests
!216
Jweatherford refactor
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Jweatherford refactor
jweatherford-refactor
into
development
Overview
0
Commits
16
Pipelines
1
Changes
3
Closed
Jeff Weatherford
requested to merge
jweatherford-refactor
into
development
1 year ago
Overview
0
Commits
16
Pipelines
1
Changes
3
Expand
👍
0
👎
0
Merge request reports
Compare
development
development (base)
and
latest version
latest version
cea9637f
16 commits,
1 year ago
3 files
+
25
−
117
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
Dockerfile
+
15
−
73
Options
@@ -2,81 +2,23 @@ ARG BASE_REGISTRY=registry1.dso.mil
ARG
BASE_IMAGE=ironbank/redhat/ubi/ubi8
ARG
BASE_TAG=8.8
FROM
${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
as
build
RUN
dnf upgrade
-y
--nodocs
&&
\
dnf
install
-y
--nodocs
\
bzip2-devel
\
expat-devel
\
gcc
\
libffi-devel
\
libuuid-devel
\
make
\
openssl-devel
\
sqlite-devel
\
xz-devel
&&
\
dnf clean all
&&
\
rm
-rf
/var/cache/dnf
COPY
python.tar.gz /
RUN
mkdir
-p
/usr/local/src/python
&&
\
tar
-zxf
python.tar.gz
-C
/usr/local/src/python
--strip-components
=
1
&&
\
cd
/usr/local/src/python
&&
\
./configure
\
--enable-loadable-sqlite-extensions
\
--enable-optimizations
\
--enable-option-checking
=
fatal
\
--enable-shared
\
--with-system-expat
\
--with-ensurepip
&&
\
make
&&
\
make altinstall
RUN
find /usr/local
-depth
\
\(
\
\(
-type
d
-a
\(
-name
test
-o
-name
tests
-o
-name
idle_test
\)
\)
\
-o
\(
-type
f
-a
\(
-name
'*.pyc'
-o
-name
'*.pyo'
-o
-name
'*.a'
\)
\)
\
\)
-exec
rm
-rf
'{}'
+
&&
\
echo
'/usr/local/lib'
>>
/etc/ld.so.conf
&&
\
ldconfig
COPY
requirements.txt .
RUN
pip3.8
install
-r
requirements.txt
FROM
${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
RUN
dnf update
-y
--nodocs
&&
\
dnf clean all
&&
\
rm
-rf
/var/cache/dnf
ENV
PATH /usr/local/bin:$PATH
COPY
--from=build /usr/local/include/python3.8 /usr/local/include/python3.8
COPY
--from=build /usr/local/lib /usr/local/lib
COPY
--from=build /usr/local/bin /usr/local/bin
RUN
cd
/usr/local/bin
&&
\
ln
-s
idle3.8 idle3
&&
\
ln
-s
idle3 idle
&&
\
ln
-s
pydoc3.8 pydoc3
&&
\
ln
-s
pydoc3 pydoc
&&
\
ln
-s
python3.8 python3
&&
\
ln
-s
python3 python
&&
\
ln
-s
python3.8-config python3-config
&&
\
ln
-s
python3-config python-config
&&
\
ln
-s
easy_install-3.8 easy_install-3
&&
\
ln
-s
easy_install-3 easy_install
&&
\
ln
-s
2to3-3.8 2to3-3
&&
\
ln
-s
2to3-3 2to3
&&
\
ln
-s
pip3.8 pip3
||
true
&&
\
ln
-s
pip3 pip
||
true
&&
\
echo
'/usr/local/lib'
>>
/etc/ld.so.conf
&&
\
ldconfig
RUN
groupadd
-g
1001 python
&&
\
useradd
-r
-u
1001
-m
-s
/sbin/nologin
-g
python python
# DO NOT BUILD FROM SOURCE! CVE patches will come from RH.
# Red Hat will backport any relevant security fixes to the base packages.
# There is no need to build from source and chase dependency hell. Also,
# developers developing against RHEL 8 will be assuming the RHEL versions
# are installed and stable. If the developers want a different version
# of python than ships in the standard repos, they can install it themselves
# in whatever container they are building (and build it off the UBI base).
RUN
dnf update
&&
\
dnf upgrade
-y
--nodocs
--allowerasingt
;
\
dnf
-y
install
--nodocs
--allowerasing
python3.8
;
\
dnf clean all
;
\
rm
-rf
/var/cache/dnf/
*
;
\
groupadd
--gid
1001 python_user
;
\
useradd
-r
--uid
1001
-m
-s
/sbin/nologin
-g
python_user python_user
USER
1001
CMD
["python3"]
Loading