From b2fe2460f1cef6db4f10e0aff64c8bc95becffa3 Mon Sep 17 00:00:00 2001 From: ilya-korotya Date: Thu, 25 Mar 2021 14:13:37 +0200 Subject: [PATCH] change the base image for Dockerfile --- Dockerfile | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 819006bb..074baea9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,26 @@ -FROM ubuntu:18.04 +FROM alpine:3.12 LABEL name="httpbin" LABEL version="0.9.2" LABEL description="A simple HTTP service." LABEL org.kennethreitz.vendor="Kenneth Reitz" -ENV LC_ALL=C.UTF-8 -ENV LANG=C.UTF-8 - -RUN apt update -y && apt install python3-pip git -y && pip3 install --no-cache-dir pipenv +ADD . /httpbin -ADD Pipfile Pipfile.lock /httpbin/ -WORKDIR /httpbin -RUN /bin/bash -c "pip3 install --no-cache-dir -r <(pipenv lock -r)" +RUN apk update && apk upgrade && apk add py-pip +# until we have precompiled gevent + brotli, we need this: +RUN apk add --no-cache --virtual .build-deps \ + build-base \ + gcc \ + g++ \ + musl-dev \ + python3-dev \ + libffi-dev \ + openssl-dev \ + libstdc++6 -ADD . /httpbin -RUN pip3 install --no-cache-dir /httpbin +RUN pip install --no-cache-dir wheel +RUN pip install --no-cache-dir gunicorn /httpbin EXPOSE 80