-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #690 from rjocoleman/feat/add_tags_to_dockerfile
Add additional build tags to Dockerfile
- Loading branch information
Showing
2 changed files
with
8 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
FROM golang:1.19-alpine AS build-env | ||
|
||
ARG ADDITIONAL_BUILD_TAGS="" | ||
|
||
RUN set -ex && \ | ||
apk upgrade --no-cache --available && \ | ||
apk add --no-cache build-base | ||
|
@@ -12,7 +14,7 @@ RUN go mod download | |
COPY . ./ | ||
RUN mkdir -p /pkg/data && \ | ||
cp maddy.conf.docker /pkg/data/maddy.conf && \ | ||
./build.sh --builddir /tmp --destdir /pkg/ --tags docker build install | ||
./build.sh --builddir /tmp --destdir /pkg/ --tags "docker ${ADDITIONAL_BUILD_TAGS}" build install | ||
|
||
FROM alpine:3.18.4 | ||
LABEL maintainer="[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,11 @@ command. One way to it is to run it using `docker exec` instead of `docker run`: | |
docker exec -it container_name_here maddy creds create [email protected] | ||
``` | ||
|
||
## Build Tags | ||
|
||
Some Maddy features (such as automatic certificate management via ACME with [a non-default libdns provider](../reference/tls-acme/#dns-providers)) require build tags to be passed to Maddy's `build.sh`, as this is run in the Dockerfile you must compile your own Docker image. Build tags can be set via the docker build argument `ADDITIONAL_BUILD_TAGS` e.g. `docker build --build-arg ADDITIONAL_BUILD_TAGS="libdns_acmedns libdns_route53" -t yourorgname/maddy:yourtagname .`. | ||
|
||
|
||
## TL;DR | ||
|
||
``` | ||
|