Files
fiscad-dgi-front/Dockerfile
2026-04-01 17:15:17 +01:00

27 lines
860 B
Docker

FROM nginx:latest as build
## Replace the default nginx index page with our Angular app
COPY ./.htaccess /usr/share/nginx/html
COPY dist/infocad-back-office /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/nginx.conf
RUN chmod -R 777 /usr/share/nginx/html
CMD ["/bin/bash", "-c", \
"echo API_URL=[$API_URL], && \
sed -i s#MY_APP_API_URL#$API_URL#g /usr/share/nginx/html/main.*.js && \
nginx -g 'daemon off;'"]
#from my MAC
#docker build --platform linux/amd64 -t front-fiscad . ou docker build -t front-fiscad .
#docker save -o ./front-fiscad.tar front-fiscad
#docker load -i front-fiscad.tar
#docker run -d -p 8081:80 -e API_URL=http://localhost:9090/ front-fiscad
#docker ps
#docker stop CONTAINER_ID ==> docker ps (pour trouver le CONTAINER_ID)
#docker images -a
#docker rmi IMAGE_ID (supprimer une image) ==> docker ps (pour trouver le IMAGE_ID)