Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the base image for Dockerfile #640

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down