Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Dockerfile #4797

Open
tonekk opened this issue Mar 29, 2022 · 15 comments
Open

Fix Dockerfile #4797

tonekk opened this issue Mar 29, 2022 · 15 comments

Comments

@tonekk
Copy link
Contributor

tonekk commented Mar 29, 2022

The current Dockerfile has some serious deficiencies.
We had huge problems using it in production.

I would like to offer to provide a Docker setup (or maybe different ones for production and development), which is implemented according to current best practices.

The goal should be to render consul/installer obsolete since modern deployment should just happen via docker.

@javierm
Copy link
Member

javierm commented Mar 29, 2022

Hi, @tonekk 😄.

We're actually looking for someone to help us with Docker 🎉. We've got an open pull request and another one in development. Would it be possible for you to have a look at pull request #4765 (the part regarding the .dockerignore file) and check whether it introduces breaking changes or it can be improved in any other way?

I've just opened pull request #4798 (which depends on the previous one) so you can have a look at what we're currently working on. Maybe we could work together on that one? What do you think? 🤔

The goal should be to render consul/installer obsolete since modern deployment should just happen via docker.

We're still going to maintain the installer even if we improve the Docker configuration, because there are institutions who need/prefer a "classic" installation. But it would be awesome to provide both options, since AFAIK our current Docker configuration wasn't done with production environments in mind.

@javierm javierm added the Devops label Mar 29, 2022
@muki
Copy link

muki commented Apr 5, 2022

Incidentally I am also currently working on Dockerizing Consul. My final mission is to deploy it to a Kubernetes cluster, but proper Dockerfiles are the necessary first step.

I can confirm that as of this morning master + docker_ignore + docker_cleanup build and docker-compose up starts a server. There's things still to polish, but I would suggest merging #4798 and #4765 as soon as possible so continued development has a stable base.

I have a few changes I'd like to PR on top of these that will hopefully simplify the Docker setup and move this issue closer to resolution.

@tonekk
Copy link
Contributor Author

tonekk commented Apr 5, 2022

We've just dockerized docker, too.
I will create a pull request today, so maybe we can discuss some best practices

@javierm
Copy link
Member

javierm commented Apr 5, 2022

@muki @tonekk Sounds great! 🎉 Looking forward to the pull request!

By the way, before merging #4798 I'd need confirmation that the commit "Remove redundant commands" is correct, since those lines seem redundant and docker compose seems to work without them, but due to my limited knowledge I'm not sure whether I might be missing something 🤔.

@muki
Copy link

muki commented Apr 6, 2022

Yes, they are redundant because those things are defined in the Dockerfile. The docker-compose stuff just overrides them (with the same values in this case).

Personally I often keep command there just so it's explicit, especially if the "production" command in the Dockerfile differs from the development command you'd want to run with docker-compose. But that heavily depends on the assumption that docker-compose.yaml is mostly for dev purposes (which it very often isn't).

The opinions in the previous paragraph are incredibly personal though, so I think just leaving it removed as it is right now is definitely a good enough choice.

@javierm
Copy link
Member

javierm commented Apr 12, 2022

@muki Both pull requests have been merged 👍.

@muki
Copy link

muki commented Apr 14, 2022

Awesome! I have a working deployment, but will be extremely busy for the next 14 days. I'll try and get a PR ready sooner, but if not, expect one in two to three weeks.

@javierm
Copy link
Member

javierm commented Aug 23, 2022

Hi, @muki @tonekk 😄.

We're thinking about which features will be added in version 1.6, and were wondering: are you still working on this issue? If not, that's OK!

By the way, no pressure 😉. We certainly don't want you to be stressed about including it in time for version 1.6; we're just checking what the status is.

Thanks!

@tonekk
Copy link
Contributor Author

tonekk commented Aug 24, 2022

Hi, I could provide the Dockerfile that we use to host consul in our setup for the SVA app (mentioned in #4872).
Maybe it will need some tweaking to make its way into the repo, but we run it in production rn.

@javierm
Copy link
Member

javierm commented Aug 26, 2022

@tonekk That would be great, thanks! 😄

@Kremer80
Copy link

Kremer80 commented Jan 5, 2023

Hi @muki and @tonekk, did you create Helm Charts in order to deploy the Consul Docker image along with a running postgreSQL service in a Kubernetes Cluster (Rancher/OpenShift)? I'm starting to look into that right now. Maybe it would make sense to build a Consul Operator later on. Thanks.

@ruslanguns
Copy link

Hello @muki, @tonekk and @muki, I am interested in deploy Consul on a Kubernetes environment. Let me know you got an opportunity to create the Helm Charts or manifest for it. Thanks in advance!

@javierm
Copy link
Member

javierm commented Mar 14, 2024

Hi, @pwilimzig 😄.

Since you mentioned in #4872 that tonekk has left the team, do you think you can provide the link to the repo with the Dockerfile tonekk mentioned?

@javierm
Copy link
Member

javierm commented May 7, 2024

@muki @Kremer80 @ruslanguns @pwilimzig Does anyone on this issue have experience using Kamal? We're checking whether it'd make sense to use it to install Consul Democracy with Docker on production 🤔.

@pwilimzig
Copy link

I have never heard of Kamal. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants