Skip to content
New issue

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

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

Already on GitHub? # to your account

Docker the right way #105

Closed
wants to merge 7 commits into from
Closed

Docker the right way #105

wants to merge 7 commits into from

Conversation

tomzo
Copy link
Contributor

@tomzo tomzo commented Oct 1, 2018

This PR is on top of CD setup in #103.

What does this PR do?

  • It changes the way to build docker image. By always using the result of msbuild /t:Publish in the docker image. And we are not using docker BUILD container, but using the same artifacts that were tested in previous stage.
  • added a flag to skip running db migrations. By default it is ran. As mentioned in discussion in Improved development environment #101
  • added e2e tests, mostly ported from LiGet

Dockerfile is changed a bit:

  • uses tini for init system to reap any processes.
  • does not run as root by default. There is a baget user.
  • because of above changes default listening port to 9090.
  • when container starts it changes uid and gid of baget user based on owner of volume mount.
  • environment variables are all specified in Dockefile for clarity. Now a basic server to try out can be run with docker run baget.

Motivation

The e2e tests ensure that some of the most basic commands, such as nuget push or paket install pass.
This step would be great to execute before publishing final docker image.
Most of this is LiGet's CD ported to BaGet.
The files in .build are part of our internal bash script helpers used for common stuff. This is added for reference, nothing fancy there.

@tomzo
Copy link
Contributor Author

tomzo commented Oct 4, 2018

Opened #108 instead

@tomzo tomzo closed this Oct 4, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant