-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add Dockerfile #124
Add Dockerfile #124
Conversation
@@ -91,6 +92,26 @@ is unset (those tests are not run). To run all tests, execute | |||
TEST_WITH_NETWORK=1 make test | |||
``` | |||
|
|||
## Docker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Docker should be seen as an alternative installation and be a sub-section to "Installation and verification". Furthermore, we will also here add that there are (will be) pre-built Docker images.
In contrast to Engine and CLI, I think the details can be kept in the README file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ make distcheck
"/usr/bin/perl" "-Iinc" "-MExtUtils::Manifest=fullcheck" -e fullcheck
Not in MANIFEST: Dockerfile
|
||
```sh | ||
make docker-tag-version | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a make docker-build
I tried this command:
$ make docker-tag-version
make: *** No rule to make target 'docker-image', needed by 'docker-tag-version'. Stop.
Some argument seems to be missing. On the other hand, it looked like tagging was done as part of make docker-build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed a typo so it should work now.
Yes, when you build a new image locally it automatically gets the local
tag. That tag is used by the make docker-tag-version
and make docker-tag-latest
targets know which image to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So when do I use make docker-tag-version
and make docker-tag-latest
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The primary use case for both of these are when you want to publish a new version of the image. You use docker-tag-version
to create a version-specific tag, and docker-tag-latest
to move the latest
tag to the latest version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I can see the rules creates images with other tagging.
@@ -91,6 +92,32 @@ is unset (those tests are not run). To run all tests, execute | |||
TEST_WITH_NETWORK=1 make test | |||
``` | |||
|
|||
## Docker | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest that the following is added to make it obvious:
Clone the Git reposistory and prepare the clone:
```sh
git clone https://github.com/zonemaster/zonemaster-ldns
cd zonemaster-ldns
perl Makefile.PL
```
Tag the local base image with the current version number: | ||
|
||
```sh | ||
make docker-tag-version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rule also builds an images. I suggest:
"Build an image tagged with the current version number:"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the implementation to match the documentation.
Tag the local base image as the latest version: | ||
|
||
```sh | ||
make docker-tag-latest | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rule also builds an images. I suggest:
"Build an image tagged with the 'latest':"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the implementation to match the documentation.
@matsduf @blacksponge Please review again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will suggests some updates when it has been merged (new PR).
Purpose
This PR provides dockerization of Zonemaster LDNS.
Context
This is a step towards zonemaster/zonemaster-cli#216.
Changes
This PR adds a docker file and steps to build it.
How to test this PR
Follow the new steps in the README file.