-
Notifications
You must be signed in to change notification settings - Fork 173
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 #1944 from openziti/organize-container-image-vars
tidy container images
- Loading branch information
Showing
8 changed files
with
146 additions
and
57 deletions.
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,2 +1,2 @@ | ||
.env | ||
compose.override.yml | ||
compose.override.yml |
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 |
---|---|---|
|
@@ -6,10 +6,7 @@ FROM ${ZITI_CLI_IMAGE}:${ZITI_CLI_TAG} | |
ARG CONTROLLER_PACKAGE=./dist/dist-packages/linux/openziti-controller | ||
ARG DOCKER_BUILD_DIR=. | ||
|
||
# This build stage grabs artifacts that are copied into the final image. | ||
# It uses the same base as the final image to maximize docker cache hits. | ||
|
||
### Required OpenShift Labels | ||
### Required Labels for OpenShift | ||
LABEL name="openziti/ziti-controller" \ | ||
maintainer="[email protected]" \ | ||
vendor="NetFoundry" \ | ||
|
@@ -19,6 +16,22 @@ LABEL name="openziti/ziti-controller" \ | |
# set up image as root, then drop privs to ziggy | ||
USER root | ||
|
||
# used by entrypoint.bash to source the bootstrapping script in this image | ||
ENV ZITI_CTRL_BOOTSTRAP_BASH=/bootstrap.bash | ||
|
||
COPY ${CONTROLLER_PACKAGE}/bootstrap.bash ${ZITI_CTRL_BOOTSTRAP_BASH} | ||
COPY ${CONTROLLER_PACKAGE}/entrypoint.bash / | ||
|
||
WORKDIR /ziti-controller | ||
RUN chown -R ziggy:ziggy /ziti-controller | ||
|
||
# configure logging | ||
ENV PFXLOG_NO_JSON=true | ||
ENV ZITI_TIME_FORMAT=utc | ||
|
||
# globally toggle bootstrapping; false preserves "thin" behavior for existing deployments like K8s | ||
ENV ZITI_BOOTSTRAP=false | ||
|
||
# selectively toggle bootstrapping steps | ||
ENV ZITI_BOOTSTRAP_PKI=true | ||
ENV ZITI_BOOTSTRAP_CONFIG=true | ||
|
@@ -30,6 +43,8 @@ ENV ZITI_CA_FILE=root | |
ENV ZITI_INTERMEDIATE_FILE=intermediate | ||
ENV ZITI_SERVER_FILE=server | ||
ENV ZITI_CLIENT_FILE=client | ||
ENV ZITI_NETWORK_NAME=ctrl | ||
ENV ZITI_AUTO_RENEW_CERTS=true | ||
|
||
# defaults for bootstrapping config | ||
ENV ZITI_CTRL_ADVERTISED_PORT=1280 | ||
|
@@ -38,18 +53,6 @@ ENV ZITI_CTRL_ADVERTISED_PORT=1280 | |
ENV ZITI_CTRL_DATABASE_FILE=bbolt.db | ||
ENV ZITI_USER=admin | ||
|
||
# emit human-friendly text logs | ||
ENV PFXLOG_NO_JSON=true | ||
# used by entrypoint.bash to source the bootstrapping script in this image | ||
ENV ZITI_CTRL_BOOTSTRAP_BASH=/bootstrap.bash | ||
# used by "ziti create config controller" as filename for the controller's identity files | ||
ENV ZITI_NETWORK_NAME=ctrl | ||
# used by ziti to format timestamps in output | ||
ENV ZITI_TIME_FORMAT=utc | ||
|
||
COPY ${CONTROLLER_PACKAGE}/bootstrap.bash ${ZITI_CTRL_BOOTSTRAP_BASH} | ||
COPY ${CONTROLLER_PACKAGE}/entrypoint.bash / | ||
|
||
# run as ziggy (2171:2171) by default | ||
USER ziggy | ||
ENTRYPOINT [ "/entrypoint.bash" ] |
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
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,2 +1 @@ | ||
.env | ||
compose.override.yml |
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
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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# include this Compose file in your project to grant elevated permissions to the ziti-router container that are | ||
# necessary when ZITI_ROUTER_MODE=tproxy | ||
services: | ||
ziti-router: | ||
# Additional config for other containers using this router as a transparent intercepting proxy sidecar and default | ||
# nameserver - dns, user, cap_add are required when ZITI_ROUTER_MODE=tproxy (see adjacent README.md for TPROXY | ||
# example) | ||
# | ||
dns: | ||
- 127.0.0.1 # this router's Ziti resolver | ||
- 1.1.1.1 # any recursive resolver | ||
user: root # required to create TPROXY routes in a container? | ||
cap_add: | ||
- NET_ADMIN # required to create TPROXY rules |
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