Replaced Docker python:3.7-alpine image with python:3.7-slim-bu… (#2391)

Replaced Docker python:3.7-alpine image with python:3.7-slim-buster
This commit is contained in:
Bruno Alla 2020-01-11 16:46:09 +00:00 committed by GitHub
commit a0ad9b82b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 30 additions and 30 deletions

View File

@ -1,19 +1,17 @@
FROM python:3.7-alpine
FROM python:3.7-slim-buster
ENV PYTHONUNBUFFERED 1
RUN apk update \
RUN apt-get update \
# dependencies for building Python packages
&& apt-get install -y build-essential \
# psycopg2 dependencies
&& apk add --virtual build-deps gcc python3-dev musl-dev \
&& apk add postgresql-dev \
# Pillow dependencies
&& apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev \
# CFFI dependencies
&& apk add libffi-dev py-cffi \
&& apt-get install -y libpq-dev \
# Translations dependencies
&& apk add gettext \
# https://docs.djangoproject.com/en/dev/ref/django-admin/#dbshell
&& apk add postgresql-client
&& apt-get install -y gettext \
# cleaning up unused files
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*
# Requirements are installed here to ensure they will be cached.
COPY ./requirements /requirements

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -o errexit
set -o nounset

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -o errexit
set -o nounset

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -o errexit
set -o nounset

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -o errexit
set -o pipefail

View File

@ -9,21 +9,23 @@ RUN npm run build
# Python build stage
{%- endif %}
FROM python:3.7-alpine
FROM python:3.7-slim-buster
ENV PYTHONUNBUFFERED 1
RUN apk update \
RUN apt-get update \
# dependencies for building Python packages
&& apt-get install -y build-essential \
# psycopg2 dependencies
&& apk add --virtual build-deps gcc python3-dev musl-dev \
&& apk add postgresql-dev \
# Pillow dependencies
&& apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev \
# CFFI dependencies
&& apk add libffi-dev py-cffi
&& apt-get install -y libpq-dev \
# Translations dependencies
&& apt-get install -y gettext \
# cleaning up unused files
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*
RUN addgroup -S django \
&& adduser -S -G django django
RUN addgroup --system django \
&& adduser --system --ingroup django django
# Requirements are installed here to ensure they will be cached.
COPY ./requirements /requirements

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -o errexit
set -o pipefail

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -o errexit
set -o nounset

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -o errexit
set -o pipefail

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -o errexit
set -o pipefail

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -o errexit
set -o pipefail