mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-01-08 04:04:42 +02:00
update httpbin
This commit is contained in:
parent
98e01f4672
commit
414c6dc350
@ -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"]
|
||||
|
@ -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
|
||||
```
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user