自建容器

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
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"