From d1d28d22a8db3387a0857a5922d804c3fccf6f33 Mon Sep 17 00:00:00 2001 From: 05412 Date: Thu, 15 Aug 2024 10:49:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=BB=BA=E5=AE=B9=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 5 +++++ compose.yaml | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b21ef84 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM alpine:latest + +RUN sed -i 's@dl-cdn.alpinelinux.org@mirrors.tuna.tsinghua.edu.cn@g' /etc/apk/repositories \ + && apk add --no-cache nginx +CMD ["nginx", "-g", "daemon off;"] diff --git a/compose.yaml b/compose.yaml index 4d388d8..a0b4f75 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,10 +1,10 @@ name: surl services: - surl-front: - image: nginx:1.27.0-alpine - container_name: surl-front + front: + build: . + container_name: front ports: - - 127.0.0.1:80:11451 + - "127.0.0.1:80:11451" volumes: - "./dist:/usr/share/nginx/html:ro" - "./nginx.conf:/etc/nginx/nginx.conf"