Skip to content

Docker the right way#105

Closed
tomzo wants to merge 7 commits intoloic-sharma:masterfrom
ai-traders:docker
Closed

Docker the right way#105
tomzo wants to merge 7 commits intoloic-sharma:masterfrom
ai-traders:docker

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
0xced pushed a commit to 0xced/BaGet that referenced this pull request Mar 30, 2025
* add basic healthcheck feature loic-sharma#105

* make health endpoint configurable

* documentation

* remove newlines

---------

Co-authored-by: GALLIKER\pafor <patrick.forrer@galliker.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant