From 0a1524de548a7a6e4780c5d8ccd8be0bf7a5a160 Mon Sep 17 00:00:00 2001 From: cheliangzhao Date: Thu, 28 Sep 2023 18:10:01 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Feat:=20add=20http-server?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http-simple-server-python/.gitignore | 1 + http-simple-server-python/Dockerfile | 7 +++++++ http-simple-server-python/docker-compose.yaml | 12 ++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 http-simple-server-python/.gitignore create mode 100644 http-simple-server-python/Dockerfile create mode 100644 http-simple-server-python/docker-compose.yaml diff --git a/http-simple-server-python/.gitignore b/http-simple-server-python/.gitignore new file mode 100644 index 0000000..91e75c6 --- /dev/null +++ b/http-simple-server-python/.gitignore @@ -0,0 +1 @@ +resource diff --git a/http-simple-server-python/Dockerfile b/http-simple-server-python/Dockerfile new file mode 100644 index 0000000..854165a --- /dev/null +++ b/http-simple-server-python/Dockerfile @@ -0,0 +1,7 @@ +FROM python:alpine + +WORKDIR /resource + +EXPOSE 8000 + +CMD ["python", "-m", "http.server"] diff --git a/http-simple-server-python/docker-compose.yaml b/http-simple-server-python/docker-compose.yaml new file mode 100644 index 0000000..c570ab6 --- /dev/null +++ b/http-simple-server-python/docker-compose.yaml @@ -0,0 +1,12 @@ +version: '3' + +services: + app: + image: http-server + build: . + restart: always + volumes: + - "./resource:/resource" + ports: + - "8000:8000" +