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

New Dockerfile (fix #1459) #1537

Merged
merged 4 commits into from
Jun 15, 2022
Merged

Conversation

fdcastel
Copy link
Contributor

@fdcastel fdcastel commented Jun 14, 2022

My first attempt to solve the Docker imbroglio. 😅

Based on the great work from @jauderho 👍

Fix #1459

@fdcastel
Copy link
Contributor Author

Considerations:

  • Based on v3.16.2 release
  • Using golang 1.18 (it won't build wit 1.16)
  • dnscontrol version ir returning dnscontrol v3.16.2-dev. I don't know if this is expected or if I need to pass any other parameters to build

@tlimoncelli
Copy link
Contributor

Considerations:

  • Based on v3.16.2 release

👍

  • Using golang 1.18 (it won't build wit 1.16)

👍

  • dnscontrol version ir returning dnscontrol v3.16.2-dev. I don't know if this is expected or if I need to pass any other parameters to build

Non-docker builds are done via go run build/build.go which embeds the version number (without -dev).

Tom

@fdcastel
Copy link
Contributor Author

Rebased from master. Build ok.

@jauderho
Copy link
Contributor

jauderho commented Jun 14, 2022

I would keep the FROM statements as listed in my Dockerfile. This pins the image to a specific digest which is best practices. Dependabot or Renovate can then be used to update the FROM statements as new images become available.

See an example pull request: https://github.com/jauderho/dockerfiles/pull/708/files

@tlimoncelli it looks like the -dev is actually set in pkg/version/version.go. I hacked it so that my Dockerfile sets -ldflags="-s -w -X main.SHA=${BUILD_VERSION}". Since we are tying this to tagged releases, it should be ok. Else the Dockerfile has to be updated to extract the specific git commit.

@fdcastel I have updated my Dockerfile accordingly. You might want to refactor.

@fdcastel
Copy link
Contributor Author

@jauderho I believe I did all the changes you suggested. Please ping me if I missed something.

@tlimoncelli We still need someone versed in CircleCI to fix the current build system, right?

@jauderho
Copy link
Contributor

LGTM

@tlimoncelli
Copy link
Contributor

@tlimoncelli We still need someone versed in CircleCI to fix the current build system, right?

I may have misspoke earlier. Most of the build is on CircleCI now. So, adding the docker stuff shouldn't be too difficult. The person that did the last update is on vacation for 2 weeks, but I should be able to guess my way through it :-)

@tlimoncelli
Copy link
Contributor

[Remember that I don't know a lot about Docker and DockerHub.]

It looks to me like the Dockerfile is ready to merge. I assume we'll have a different PR that modifies the .circleci files to build the container image and put it in a public repo so others can access it.

@tlimoncelli tlimoncelli merged commit ffcc77a into StackExchange:master Jun 15, 2022
@aba-rechsteiner
Copy link
Contributor

@fdcastel thank you for your work. But on docker hub it doesn't have a new image yet, is this no longer pushed to docker hub?

@fdcastel
Copy link
Contributor Author

@aba-rechsteiner: It is not ready, yet.

As @tlimoncelli said we are waiting for the CircleCI maintainer, now.

Unfortunately I don't have any experience with CircleCI to help, in this case. 😞

@jauderho
Copy link
Contributor

@fdcastel thank you for your work. But on docker hub it doesn't have a new image yet, is this no longer pushed to docker hub?

I have working images here and they are automatically built once upstream releases and tags. https://hub.docker.com/r/jauderho/dnscontrol/tags

# 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.

Docker Image with v3.15.0
4 participants