1

I want to create application using microservices and dockers. I've never done this before, first of all I've created all microservices at gitlab, one of those will store only dockers that I want use in my app but I don't know how to do this.

Should I create empty springboot project? How to store images? Can someone give me some advices? I want to use dockers like for example MongoDB, Logstash, Minio

2 Answers 2

3

There are a few questions here. I'd suggest starting from a tutorial that covers some of the elements you're looking for e.g. 'How to run spring boot and MongoDB in docker using docker-compose'. Hosting of images you build is another question - for that you will need to choose a docker image registry. (Since you're using GitLab it might provide you options here.) But you don't necessarily need to build all of the images involved as you might be able to use a published image from dockerhub for some (e.g. mongo).

When you say that you're thinking of having a microservice to store dockers, it sounds like you're thinking of writing your own code to store docker images. I wouldn't expect you to need to do this. Then you'd effectively be writing a docker image registry and there are lots of implementations out there already that you can use.

Sign up to request clarification or add additional context in comments.

Comments

0

Should I create empty springboot project?

Yes that's a great idea. Start from start.spring.io. Generate a template project, build it and add your functionality step-by-step.

How to store images?

Start with dockerhub. You can store 1 private image for free with dockerhub (At this time of writing). If you are making your image public, remember, do not include any confidential information such as passwords. It can be easily decompiled from your docker image. Once you figure out your way, you have numerous other options, either you can sign up for enterprise account with dockerhub, or have JFrog Artifactory or your cloud vendor may have a docker registry, or there might be opensource alternatives. Personally I would stay away from cloud vendors docker registry as I don't want a vendor lockin

Can someone give me some advices?

Yes, I would suggest you to follow along a tutorial or youtube videos (choose the updated ones).

https://spring.io/guides/gs/spring-boot-docker/ https://www.baeldung.com/dockerizing-spring-boot-application

Use official docker images wherever possible

As you get more comfortable with microservices and dockerizing it, look at kubernetes, nomad etc for deployment

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.