mirror of
https://github.com/vimagick/dockerfiles
synced 2024-06-25 16:28:40 +00:00
update httpbin
This commit is contained in:
parent
98e01f4672
commit
414c6dc350
@ -2,11 +2,14 @@
|
|||||||
# Dockerfile for httpbin
|
# Dockerfile for httpbin
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM vimagick/python:3
|
FROM alpine:3
|
||||||
MAINTAINER kev <noreply@easypi.pro>
|
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
|
EXPOSE 8000
|
||||||
|
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "httpbin:app"]
|
||||||
CMD ["gunicorn", "--bind", "0.0.0.0:80", "httpbin:app"]
|
|
||||||
|
@ -8,16 +8,18 @@ httpbin
|
|||||||
## docker-compose.yml
|
## docker-compose.yml
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
httpbin:
|
version: "3.8"
|
||||||
image: vimagick/httpbin
|
services:
|
||||||
ports:
|
httpbin:
|
||||||
- "27815:80"
|
image: vimagick/httpbin
|
||||||
restart: always
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
restart: unless-stopped
|
||||||
```
|
```
|
||||||
|
|
||||||
## up and running
|
## up and running
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ docker-compose up -d
|
$ docker-compose up -d
|
||||||
$ curl http://127.0.0.1:27815/ip
|
$ curl http://127.0.0.1:27815/ip
|
||||||
```
|
```
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
httpbin:
|
version: "3.8"
|
||||||
image: vimagick/httpbin
|
services:
|
||||||
ports:
|
httpbin:
|
||||||
- "27815:80"
|
image: vimagick/httpbin
|
||||||
restart: always
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
restart: unless-stopped
|
||||||
|
Loading…
Reference in New Issue
Block a user