update httpbin

This commit is contained in:
kev 2022-02-14 18:23:42 +08:00
parent 98e01f4672
commit 414c6dc350
3 changed files with 24 additions and 17 deletions

View File

@ -2,11 +2,14 @@
# Dockerfile for httpbin
#
FROM vimagick/python:3
MAINTAINER kev <noreply@easypi.pro>
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"]

View File

@ -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
```

View File

@ -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