Skip to content

Docker image for production - #563

Open
MichaelTimbert wants to merge 9 commits into
zonemaster:developfrom
MichaelTimbert:dockerproduction
Open

MichaelTimbert wants to merge 9 commits into
zonemaster:developfrom
MichaelTimbert:dockerproduction

Conversation

@MichaelTimbert

@MichaelTimbert MichaelTimbert commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

This PR prepares the docker/Dockerfile-gui image, which is based on httpd:2.4 (apache), for use in a production Docker setup.

Context

The docker/Dockerfile-gui image is intended for production deployments of the Zonemaster GUI.
The new CI job ensures the image keeps building.

Changes

  • New dockerfile docker/Dockerfile-gui
  • Change Makefile: Now build both docker image for 'All-In-One' and 'GUI'

Link to:

How to test this PR

Build the release:

  • npm run release

Running make docker-build-stand-alone to only build the new gui image.
if you run make this will build the 2 images:

  • zonemaster/all-in-one:local
  • zonemaster/gui:local
    Note: to build the All-In-One image you need to build need all other images (backend, cli, engine, ldns) in local to build.

You can test the image with:

docker run -ti --rm -p 80:80 \
-e ZONEMASTER_BACKEND_HOST=zm-test-from-env \
-e ZONEMASTER_BACKEND_PORT=2344 \
zonemaster/gui:local

With your browser go to http://localhost/ you must see the zonemaster gui running with the warning message "Failed to fetch version information".

@MichaelTimbert
MichaelTimbert marked this pull request as draft October 19, 2026 09:34
@MichaelTimbert MichaelTimbert changed the title Dockerproduction Docker image for production Oct 19, 2026
@matsduf
matsduf changed the base branch from master to develop October 19, 2026 09:36
@matsduf

matsduf commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

@MichaelTimbert, I set the target branch to be develop.

@MichaelTimbert MichaelTimbert added this to the v2026.2 milestone Oct 19, 2026
@MichaelTimbert MichaelTimbert self-assigned this Oct 19, 2026
@MichaelTimbert
MichaelTimbert marked this pull request as ready for review October 19, 2026 09:52
Comment thread Makefile Resolved
@matsduf

matsduf commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

I checked the branch (PR) out and ran npm install && npm run release && make docker-build, but it ended with an error.

(...)
12:47:10 [build] 32 page(s) built in 6.64s
12:47:10 [build] Complete!
Include zonemaster.conf-example in distribution zip file
Include LICENSE in distribution zip file
Zipped 804796 total bytes
Zip complete
docker build --tag zonemaster/all-in-one:local --build-arg version=v5.1.0 -f docker/Dockerfile .
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

Sending build context to Docker daemon  271.3MB
Step 1/18 : FROM zonemaster/backend:local
manifest for zonemaster/backend:local not found: manifest unknown: manifest unknown
make: *** [Makefile:6: docker-build-all-in-one] Error 1

@MichaelTimbert

Copy link
Copy Markdown
Contributor Author

@matsduf This concerns the "all-in-one" image; you need to follow the procedure described at https://github.com/zonemaster/zonemaster/blob/master/docs/internal/maintenance/ReleaseProcess-create-docker-image.md, as each image is based on the previous one.
However, for this PR, you should be able to create the zonemaster/gui image independently of the others by using the make docker-build-stand-alone command.

@matsduf

matsduf commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

@matsduf This concerns the "all-in-one" image; you need to follow the procedure described at https://github.com/zonemaster/zonemaster/blob/master/docs/internal/maintenance/ReleaseProcess-create-docker-image.md, as each image is based on the previous one. However, for this PR, you should be able to create the zonemaster/gui image independently of the others by using the make docker-build-stand-alone command.

Of course! I did not think of that. I was focused on the new image. Could you update "how to test" with a comment that all-in-one requires the full chain?

I will redo my test with stand-alone only.

@matsduf

matsduf commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

So far so good. When I follow "how to test" I get the expected result. Next step is to test it against Backend in Docker.

On the server I see some logs from Apache. One such line is

Name or service not known: [client 172.17.0.1:56760] AH00898: DNS lookup failure for: zm-rpcapi returned by /api, referer: http://localhost:8090/en/

How will a DNS lookup for zm-rpcapi ever pass?

@MichaelTimbert

Copy link
Copy Markdown
Contributor Author

Good point. While zm-rpcapi will indeed be resolved once it’s used in a docker-compose file, it would be cleaner to make it configurable. I’ll come up with a solution.

@matsduf

matsduf commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Good point. While zm-rpcapi will indeed be resolved once it’s used in a docker-compose file, it would be cleaner to make it configurable. I’ll come up with a solution.

To make the Backend connect URL configurable? It means all parts including if it is http or https and what port to connect to?

@MichaelTimbert

MichaelTimbert commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Good point. While zm-rpcapi will indeed be resolved once it’s used in a docker-compose file, it would be cleaner to make it configurable. I’ll come up with a solution.

To make the Backend connect URL configurable? It means all parts including if it is http or https and what port to connect to?

The ZONEMASTER_BACKEND_HOST and ZONEMASTER_BACKEND_PORT environment variables are now used to specify the backend URL. The method I employed does not seem to work for the scheme (http/https). If we want this to be configurable, I need to find a different approach.

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.

2 participants