Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docker-image
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tools
docker-image
Commits
bdc7d581
Commit
bdc7d581
authored
Oct 09, 2018
by
caiyanming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init python3 dockerfile
Change-Id: Ic4ae26515270148a4977a4378cf506c0a076440c
parent
7d31c107
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
0 deletions
+90
-0
python3/Dockerfile
python3/Dockerfile
+90
-0
No files found.
python3/Dockerfile
0 → 100644
View file @
bdc7d581
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM
buildpack-deps:stretch
# ensure local python is preferred over distribution python
ENV
PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV
LANG C.UTF-8
# extra dependencies (over what buildpack-deps already includes)
RUN
apt-get update
&&
apt-get
install
-y
--no-install-recommends
\
tk-dev
\
uuid-dev
\
&&
rm
-rf
/var/lib/apt/lists/
*
ENV
GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
ENV
PYTHON_VERSION 3.7.0
RUN
set
-ex
\
\
&&
wget
-O
python.tar.xz
"https://www.python.org/ftp/python/
${
PYTHON_VERSION
%%[a-z]*
}
/Python-
$PYTHON_VERSION
.tar.xz"
\
&&
wget
-O
python.tar.xz.asc
"https://www.python.org/ftp/python/
${
PYTHON_VERSION
%%[a-z]*
}
/Python-
$PYTHON_VERSION
.tar.xz.asc"
\
&&
export
GNUPGHOME
=
"
$(
mktemp
-d
)
"
\
&&
gpg
--keyserver
ha.pool.sks-keyservers.net
--recv-keys
"
$GPG_KEY
"
\
&&
gpg
--batch
--verify
python.tar.xz.asc python.tar.xz
\
&&
{
command
-v
gpgconf
>
/dev/null
&&
gpgconf
--kill
all
||
:
;
}
\
&&
rm
-rf
"
$GNUPGHOME
"
python.tar.xz.asc
\
&&
mkdir
-p
/usr/src/python
\
&&
tar
-xJC
/usr/src/python
--strip-components
=
1
-f
python.tar.xz
\
&&
rm
python.tar.xz
\
\
&&
cd
/usr/src/python
\
&&
gnuArch
=
"
$(
dpkg-architecture
--query
DEB_BUILD_GNU_TYPE
)
"
\
&&
./configure
\
--build
=
"
$gnuArch
"
\
--enable-loadable-sqlite-extensions
\
--enable-shared
\
--with-system-expat
\
--with-system-ffi
\
--without-ensurepip
\
&&
make
-j
"
$(
nproc
)
"
\
&&
make
install
\
&&
ldconfig
\
\
&&
find /usr/local
-depth
\
\(
\
\(
-type
d
-a
\(
-name
test
-o
-name
tests
\)
\)
\
-o
\
\(
-type
f
-a
\(
-name
'*.pyc'
-o
-name
'*.pyo'
\)
\)
\
\)
-exec
rm
-rf
'{}'
+
\
&&
rm
-rf
/usr/src/python
\
\
&&
python3
--version
# make some useful symlinks that are expected to exist
RUN
cd
/usr/local/bin
\
&&
ln
-s
idle3 idle
\
&&
ln
-s
pydoc3 pydoc
\
&&
ln
-s
python3 python
\
&&
ln
-s
python3-config python-config
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV
PYTHON_PIP_VERSION 18.0
RUN
set
-ex
;
\
\
wget
-O
get-pip.py
'https://bootstrap.pypa.io/get-pip.py'
;
\
\
python get-pip.py
\
--disable-pip-version-check
\
--no-cache-dir
\
"pip==
$PYTHON_PIP_VERSION
"
\
;
\
pip
--version
;
\
\
find /usr/local
-depth
\
\(
\
\(
-type
d
-a
\(
-name
test
-o
-name
tests
\)
\)
\
-o
\
\(
-type
f
-a
\(
-name
'*.pyc'
-o
-name
'*.pyo'
\)
\)
\
\)
-exec
rm
-rf
'{}'
+
;
\
rm
-f
get-pip.py
CMD
["python3"]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment