1. nuxtjs
Dockerfile 생성후
FROM node:12
WORKDIR /app
ADD . /app/
# global install & update
RUN npm i -g npm
#&& npm i -g yarn
RUN rm yarn.lock
RUN yarn
RUN yarn build
ENV HOST 0.0.0.0
EXPOSE 80
# start command
CMD [ "yarn", "start" ]
#sudo docker build --tag web-front:1.0.0 .
#docker run --name web_80 -p 80:80 web-front:1.0.0
#docker run --name web_8081 -p 8081:80 web-front:1.0.0
2.springboot
FROM openjdk:8-jdk-alpine
VOLUME /tmp
ARG JAR_FILE=target/*.war
COPY ${JAR_FILE} web-backend.war
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Dspring.profiles.active=local","-jar","/web-backend.war"]
#docker build --build-arg "JAR_FILE=build/libs/*.war" -t web-backend:1.0.0 .
#docker run --name hehe3 -p 8081:8081 web-backend:1.0.0
0 comments:
댓글 쓰기