diff --git a/httpbin/Dockerfile b/httpbin/Dockerfile index 45fbbdd..c267f07 100644 --- a/httpbin/Dockerfile +++ b/httpbin/Dockerfile @@ -2,11 +2,14 @@ # Dockerfile for httpbin # -FROM vimagick/python:3 -MAINTAINER kev +FROM alpine:3 +MAINTAINER EasyPi Software Foundation -RUN pip install --no-cache-dir gunicorn httpbin +RUN set -xe \ + && apk add --no-cache build-base libffi-dev python3 python3-dev \ + && python3 -m ensurepip \ + && pip3 install --no-cache-dir gunicorn httpbin \ + && apk del build-base libffi-dev python3-dev -EXPOSE 80 - -CMD ["gunicorn", "--bind", "0.0.0.0:80", "httpbin:app"] +EXPOSE 8000 +CMD ["gunicorn", "--bind", "0.0.0.0:8000", "httpbin:app"] diff --git a/httpbin/README.md b/httpbin/README.md index 80cfaaf..1bb9ea0 100644 --- a/httpbin/README.md +++ b/httpbin/README.md @@ -8,16 +8,18 @@ httpbin ## docker-compose.yml ```yaml -httpbin: - image: vimagick/httpbin - ports: - - "27815:80" - restart: always +version: "3.8" +services: + httpbin: + image: vimagick/httpbin + ports: + - "8000:8000" + restart: unless-stopped ``` ## up and running -``` +```bash $ docker-compose up -d $ curl http://127.0.0.1:27815/ip ``` diff --git a/httpbin/docker-compose.yml b/httpbin/docker-compose.yml index cba886b..9446dab 100644 --- a/httpbin/docker-compose.yml +++ b/httpbin/docker-compose.yml @@ -1,5 +1,7 @@ -httpbin: - image: vimagick/httpbin - ports: - - "27815:80" - restart: always +version: "3.8" +services: + httpbin: + image: vimagick/httpbin + ports: + - "8000:8000" + restart: unless-stopped