自建容器

This commit is contained in:
05412 2024-08-15 10:49:02 +08:00
parent 083cae774f
commit d1d28d22a8
2 changed files with 9 additions and 4 deletions

5
Dockerfile Normal file
View File

@ -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;"]

View File

@ -1,10 +1,10 @@
name: surl name: surl
services: services:
surl-front: front:
image: nginx:1.27.0-alpine build: .
container_name: surl-front container_name: front
ports: ports:
- 127.0.0.1:80:11451 - "127.0.0.1:80:11451"
volumes: volumes:
- "./dist:/usr/share/nginx/html:ro" - "./dist:/usr/share/nginx/html:ro"
- "./nginx.conf:/etc/nginx/nginx.conf" - "./nginx.conf:/etc/nginx/nginx.conf"