Reputation: 171
I already have a vue application containerized and running, but how do I put it in docker compose?
Dockerfile:
FROM node:14
WORKDIR /app
RUN npm install @babel/core @babel/node @babel/preset-env nodemon express axios cors mongodb
COPY . .
EXPOSE 4200
CMD ["npm", "run", "serve"]
So when I try to put port "4200" it says that I have already the same port running, so how do I put that container inside whole app which will store multiple containers?
This is my docker-compose try:
version: '3.8'
services:
posts:
build: ./posts
ports:
- "4200:4200"
So this is the visualisation of something that I want to do:
Upvotes: 2
Views: 1181