forked from platypush/platypush
Use Debian Buster image instead of Alpine for docker images
This commit is contained in:
parent
20feedaf07
commit
96bdefdaf3
1 changed files with 23 additions and 11 deletions
|
@ -55,7 +55,7 @@ def generate_dockerfile(deps, ports, cfgfile, devdir, python_version):
|
||||||
os.makedirs(devdir, exist_ok=True)
|
os.makedirs(devdir, exist_ok=True)
|
||||||
content = textwrap.dedent(
|
content = textwrap.dedent(
|
||||||
'''
|
'''
|
||||||
FROM python:alpine{python_version}
|
FROM python:{python_version}-slim-buster
|
||||||
|
|
||||||
RUN mkdir -p /app
|
RUN mkdir -p /app
|
||||||
RUN mkdir -p /etc/platypush
|
RUN mkdir -p /etc/platypush
|
||||||
|
@ -84,11 +84,19 @@ def generate_dockerfile(deps, ports, cfgfile, devdir, python_version):
|
||||||
|
|
||||||
content += textwrap.dedent(
|
content += textwrap.dedent(
|
||||||
'''
|
'''
|
||||||
RUN apk add --update --no-cache --virtual build-base \\
|
RUN dpkg --configure -a \\
|
||||||
&& apk add --update --no-cache --virtual git \\
|
&& apt-get -f install \\
|
||||||
&& apk add --update --no-cache --virtual libffi-dev \\
|
&& apt-get --fix-missing install \\
|
||||||
&& apk add --update --no-cache --virtual libjpeg-turbo-dev \\
|
&& apt-get clean \\
|
||||||
&& apk add --update --no-cache --virtual zlib-dev \\
|
&& apt-get update \\
|
||||||
|
&& apt-get -y upgrade \\
|
||||||
|
&& apt-get -y dist-upgrade \\
|
||||||
|
&& apt-get install --no-install-recommends -y apt-utils\\
|
||||||
|
&& apt-get install --no-install-recommends -y build-essential \\
|
||||||
|
&& apt-get install --no-install-recommends -y git \\
|
||||||
|
&& apt-get install --no-install-recommends -y libffi-dev \\
|
||||||
|
&& apt-get install --no-install-recommends -y libjpeg-dev \\
|
||||||
|
&& apt-get install --no-install-recommends -y zlib1g-dev \\
|
||||||
''')
|
''')
|
||||||
|
|
||||||
for i, dep in enumerate(deps):
|
for i, dep in enumerate(deps):
|
||||||
|
@ -105,11 +113,15 @@ def generate_dockerfile(deps, ports, cfgfile, devdir, python_version):
|
||||||
&& pip install -r requirements.txt \\
|
&& pip install -r requirements.txt \\
|
||||||
&& python setup.py web_build
|
&& python setup.py web_build
|
||||||
|
|
||||||
RUN apk del git \\
|
RUN apt-get remove -y git \\
|
||||||
&& apk del build-base \\
|
&& apt-get remove -y build-essential \\
|
||||||
&& apk del libffi-dev \\
|
&& apt-get remove -y libffi-dev \\
|
||||||
&& apk del libjpeg-turbo-dev \\
|
&& apt-get remove -y libjpeg-dev \\
|
||||||
&& apk del zlib-dev
|
&& apt-get remove -y zlib1g-dev \\
|
||||||
|
&& apt-get remove -y apt-utils \\
|
||||||
|
&& apt-get clean \\
|
||||||
|
&& apt-get autoremove -y \\
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
''')
|
''')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue