DEV Community

Adam Crockett πŸŒ€
Adam Crockett πŸŒ€

Posted on

Docker Development

Okay so I need a little help understanding something.

I have a few requirements for an app I'm working on.

Requirements

  • MongoDB
  • Kotlin on graalVM

Now both of the above have images but how do I get them to smush together in an image of my own.

example of an image:
https://hub.docker.com/r/oracle/graalvm-ce

Do I just write my own docker file and ignore the official distributions?

Top comments (4)

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

Dockerfile should pull in files from the same folder by default, if not .dockerignore'd.

FROM oracle/graalvm-ce
CMD ["node", "index.js"]
Enter fullscreen mode Exit fullscreen mode

As to run MongoDB, I would create docker-compose.yml. Something like this.

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€

So that's what docker compose is. Il go do some research.

Collapse
 
dansilcox profile image
Dan Silcox

Better off using docker compose or similar to have 2 separate images rather than combining the 2 services in one container - that gives you more control over scaling, eg just the DB or just the app part, and just generally makes it easier to keep track of what’s going on

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€

Thanks Dan, I found that out a couple of hours ago whilst researching, its quite a lot easier than doing this manually.
I feel like Im an in an Alien world right now, great fun!