Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
docker-cubicweb
Commits
5fd5731101d4
Commit
2d20fee3
authored
Jun 30, 2021
by
Noé Gaumont
🐙
Browse files
feat: drop python version selection and force python3
parent
bf9c15adbfcd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
5fd57311
...
...
@@ -4,18 +4,17 @@ ENV LANG C.UTF-8
RUN
mkdir
-p
/usr/share/man/man1
&&
mkdir
-p
/usr/share/man/man7
RUN
apt-get update
&&
apt-get
-y
dist-upgrade
\
&&
rm
-rf
/var/lib/apt/lists/
*
ARG
PYTHON
RUN
apt-get update
&&
apt-get
-y
--no-install-recommends
install
\
gettext
\
uwsgi
\
uwsgi-plugin-
$PYTHON
\
uwsgi-plugin-
python3
\
graphviz
\
postgresql-client
\
$PYTHON
-pip
\
$PYTHON
-setuptools
\
python3
-pip
\
python3
-setuptools
\
pwgen
\
&&
rm
-rf
/var/lib/apt/lists/
*
RUN
test
$PYTHON
=
"python"
&&
export
py
=
python2
pip
=
pip2
||
export
py
=
python3
pip
=
pip3
;
\
RUN
export
py
=
python3
pip
=
pip3
;
\
update-alternatives
--install
/usr/bin/python python /usr/bin/
$py
50
&&
\
update-alternatives
--install
/usr/bin/pip pip /usr/bin/
$pip
50
&&
\
pip
install
--upgrade
pip
...
...
@@ -27,7 +26,6 @@ ENV PIP_DISABLE_PIP_VERSION_CHECK on
RUN
useradd cubicweb
--uid
1000
-m
-s
/bin/bash
RUN
install
-d
-o
cubicweb
-g
cubicweb /etc/cubicweb.d
COPY
uwsgi.ini /etc/uwsgi/uwsgi.ini
RUN
echo
"plugins = http,
$PYTHON
"
>>
/etc/uwsgi/uwsgi.ini
COPY
pyramid.ini.j2 /
COPY
entrypoint.sh /entrypoint.sh
RUN
chmod
+x /entrypoint.sh
...
...
build.py
View file @
5fd57311
...
...
@@ -156,7 +156,6 @@ def build_image(image: CubicWebImage, onbuild: Optional[str], no_cache=False) ->
args
[
"FROM"
]
=
image
.
tag
tag
=
image
.
tag
+
"-onbuild"
else
:
args
[
"PYTHON"
]
=
"python3"
dockerfile
=
"Dockerfile"
args
[
"DIST"
]
=
image
.
debian_dist
args
[
"CUBICWEB_SOURCE"
]
=
f
"cubicweb[pyramid]==
{
image
.
cubicweb_version
}
"
...
...
uwsgi.ini
View file @
5fd57311
...
...
@@ -9,3 +9,4 @@ lazy-apps = true
log-master
=
true
disable-logging
=
true
http-timeout
=
180
plugins
=
http,python3
Write
Preview
Supports
Markdown
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