context copy

main
xingzi 2 years ago
parent e0fcd9f59c
commit 5561abb619

@ -3,14 +3,10 @@ version: "3"
services:
frontend:
build:
context: ./docker
dockerfile: Dockerfile
context: .
dockerfile: ./docker/Dockerfile
image: eladmin-frontend:latest
container_name: eladmin-frontend
command: ["cp", "./dist", "/usr/share/nginx/html"]
restart: always
# restart: always
ports:
- "8282:80"
volumes:
# - ./docker/conf/conf.d:/etc/nginx/conf.d
# - ./dist:/usr/share/nginx/html

@ -1,5 +1,8 @@
FROM nginx:1.12
# set timezome
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY ./docker/conf/nginx.conf /etc/nginx/nginx.conf
COPY ./docker/conf/conf.d/default.conf /etc/nginx/conf.d/default.conf
COPY ./dist /var/www/html
Loading…
Cancel
Save