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

Build Stage #3

Open
BartoGabriel opened this issue Aug 14, 2020 · 2 comments
Open

Build Stage #3

BartoGabriel opened this issue Aug 14, 2020 · 2 comments
Labels

Comments

@BartoGabriel
Copy link

In the project, the construction part is done directly from the gitlab-cy file with the goland image. But another way to do it is to handle this build in a dockerfile (eg a multistage).

I like the idea that everything is in a Docker and being able to build in any environment with the same version of goland. At the same time, for example if the application is python or dotnet, the way it is current in the project should remember to change the python versions in both the Dockerfile and gitlab-ci file. What I don't like is that you end up handling everything with Docker-in-Docker.

What do you consider to be a best practice and why?

@galexrt
Copy link
Owner

galexrt commented Aug 15, 2020

From my perspective it simply depends.

Building the binaries and then copying them into a Docker container can have the advantages of "easily" being to able to separately publish the binaries, e.g., Golang projects on GitHub most of the time release binaries and Docker images.

You could copy the binaries out of the container after docker build to have binaries as well, but there isn't really too much "difference" if you think about then. Same result, Docker image and binaries.

Regarding "Docker-in-Docker", as there are more and more ways to build containers without Docker (e.g., buildah, etc) and even without root and / or privileged: true makes it more viable to build images in the CI without "second thoughts" again.

I have a ticket open #2 which is generally aimed at "redoing" the whole project here to be "more uptodate and use the new funky cloud native tools". I just haven't come around to that yet, but I have it on my roadmap.

Let me know if that answers your questions / points. Thanks!

@BartoGabriel
Copy link
Author

Thank you very much for your reply. And thanks for the project and blog posts, you have helped me a lot.

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

No branches or pull requests

2 participants