Docker Community Forums

Share and learn in the Docker community.

Which base should I choose with NodeJS(SocketIO) and mongoDB

docker

(Dominwong4) #1

Hi dockerers,

I want to put my NodeJS(SocketIO) server with Mongodb to docker.
If I want to put them together, should I choose ubuntu as my base os rather than node image from docker official?


(David Maze) #2

You shouldn’t put them together. I would:

  1. Write a Dockerfile starting FROM node, and ADD the output of npm pack
  2. Write a Docker Compose YAML file that runs image: tutum/mongodb, plus a second container build: . with the application code

(Dominwong4) #3

I see I will try it Thank you!