Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Many users visit the repo primarily to quickly deploy and test a local instance of astrometry.net's web APIs or web interfaces. While it's possible to follow the detailed instructions in the
net
folder, having a docker file would significantly simplify this process and make the repo more accessible. We already have a set of docker files, but there's still room for improvement.--net=host
, the container shares the same web interface with the host. This isn't very secure and can sometimes lead to unexpected behavior. For instance, in the container,localhost
refers to the host machine, not the container.This PR aims to address the issues mentioned above, except the last one, which needs further guidance from the author(s) and the community. Before we delve into the details, I'd like to discuss the second issue as it involves a fundamental design decision.
The Dockerfile's core function is to pull the code, the configuration, and the data. While pulling from GitHub ensures the code is always the latest version, it also has several drawbacks:
Considering that the Docker file is located within the repository, it implies that the user is expected to already have the repository on hand. After weighing the pros and cons, this PR proposes an alternative to the current solution. The suggestion is to directly copy the local code and configurations to the container. The only exception is the data, which could be quite large. To save image building time and enhance reusability across multiple containers when needed, we map it to the container as a volume.
I'm open to any suggestions on the PR.