Skip to content
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 more granular "Advanced" filtering #13

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 101 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ RUN \
rm -f /etc/nginx/conf.d/stream.conf && \
rm -f /etc/nginx/http.d/default.conf

ENV SOCKET_PATH=/var/run/docker.sock

ENV ALLOW_RESTARTS=0 \
ALLOW_STOP=0 \
ALLOW_START=0 \
Expand All @@ -48,13 +50,111 @@ ENV ALLOW_RESTARTS=0 \
SECRETS=0 \
SERVICES=0 \
SESSION=0 \
SOCKET_PATH=/var/run/docker.sock \
SWARM=0 \
SYSTEM=0 \
TASKS=0 \
VERSION=1 \
VOLUMES=0

ENV ADVANCED=0 \
PING=0 \
AUTH=0 \
BUILD=0 \
BUILD_PRUNE=0 \
COMMIT=0 \
CONFIGS=0 \
CONFIGS_CREATE=0 \
CONFIGS_ID=0 \
CONFIGS_ID_UPDATE=0 \
CONTAINERS_CREATE=0 \
CONTAINERS_JSON=0 \
CONTAINERS_PRUNE=0 \
CONTAINERS_ID=0 \
CONTAINERS_ID_ARCHIVE=0 \
CONTAINERS_ID_ATTACH=0 \
CONTAINERS_ID_ATTACH_WS=0 \
CONTAINERS_ID_CHANGES=0 \
CONTAINERS_ID_EXEC=0 \
CONTAINERS_ID_EXPORT=0 \
CONTAINERS_ID_JSON=0 \
CONTAINERS_ID_KILL=0 \
CONTAINERS_ID_LOGS=0 \
CONTAINERS_ID_PAUSE=0 \
CONTAINERS_ID_RENAME=0 \
CONTAINERS_ID_RESIZE=0 \
CONTAINERS_ID_RESTART=0 \
CONTAINERS_ID_START=0 \
CONTAINERS_ID_STATS=0 \
CONTAINERS_ID_STOP=0 \
CONTAINERS_ID_TOP=0 \
CONTAINERS_ID_UNPAUSE=0 \
CONTAINERS_ID_UPDATE=0 \
CONTAINERS_ID_WAIT=0 \
DISTRIBUTION_NAME_JSON=0 \
EVENTS=0 \
EXEC_ID_JSON=0 \
EXEC_ID_RESIZE=0 \
EXEC_ID_START=0 \
IMAGES_CREATE=0 \
IMAGES_GET=0 \
IMAGES_JSON=0 \
IMAGES_LOAD=0 \
IMAGES_PRUNE=0 \
IMAGES_SEARCH=0 \
IMAGES_NAME=0 \
IMAGES_NAME_GET=0 \
IMAGES_NAME_HISTORY=0 \
IMAGES_NAME_JSON=0 \
IMAGES_NAME_PUSH=0 \
IMAGES_NAME_TAG=0 \
INFO=0 \
NETWORKS=0 \
NETWORKS_CREATE=0 \
NETWORKS_PRUNE=0 \
NETWORKS_ID=0 \
NETWORKS_ID_CONNECT=0 \
NETWORKS_ID_DISCONNECT=0 \
NODES=0 \
NODES_ID=0 \
NODES_ID_UPDATE=0 \
PLUGINS=0 \
PLUGINS_CREATE=0 \
PLUGINS_PRIVILEGES=0 \
PLUGINS_PULL=0 \
PLUGINS_NAME=0 \
PLUGINS_NAME_DISABLE=0 \
PLUGINS_NAME_ENABLE=0 \
PLUGINS_NAME_JSON=0 \
PLUGINS_NAME_PUSH=0 \
PLUGINS_NAME_SET=0 \
PLUGINS_NAME_UPGRADE=0 \
SECRETS=0 \
SECRETS_CREATE=0 \
SECRETS_ID=0 \
SECRETS_ID_UPDATE=0 \
SERVICES=0 \
SERVICES_CREATE=0 \
SERVICES_ID=0 \
SERVICES_ID_LOGS=0 \
SERVICES_ID_UPDATE=0 \
SESSION=0 \
SWARM=0 \
SWARM_INIT=0 \
SWARM_JOIN=0 \
SWARM_LEAVE=0 \
SWARM_UNLOCK=0 \
SWARM_UNLOCKKEY=0 \
SWARM_UPDATE=0 \
SYSTEM_DF=0 \
TASKS=0 \
TASKS_ID=0 \
TASKS_ID_LOGS=0 \
VERSION=0 \
VOLUMES=0 \
VOLUMES_CREATE=0 \
VOLUMES_PRUNE=0 \
VOLUMES_NAME=0

# add local files
COPY root/ /

Expand Down
154 changes: 127 additions & 27 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,133 @@ RUN \
rm -f /etc/nginx/conf.d/stream.conf && \
rm -f /etc/nginx/http.d/default.conf

ENV ALLOW_RESTARTS=0 \
ALLOW_STOP=0 \
ALLOW_START=0 \
AUTH=0 \
BUILD=0 \
COMMIT=0 \
CONFIGS=0 \
CONTAINERS=0 \
DISTRIBUTION=0 \
EVENTS=1 \
EXEC=0 \
IMAGES=0 \
INFO=0 \
NETWORKS=0 \
NODES=0 \
PING=1 \
PLUGINS=0 \
POST=0 \
SECRETS=0 \
SERVICES=0 \
SESSION=0 \
SOCKET_PATH=/var/run/docker.sock \
SWARM=0 \
SYSTEM=0 \
TASKS=0 \
VERSION=1 \
VOLUMES=0
ENV SOCKET_PATH=/var/run/docker.sock

ENV ALLOW_RESTARTS=0 \
ALLOW_STOP=0 \
ALLOW_START=0 \
AUTH=0 \
BUILD=0 \
COMMIT=0 \
CONFIGS=0 \
CONTAINERS=0 \
DISTRIBUTION=0 \
EVENTS=1 \
EXEC=0 \
IMAGES=0 \
INFO=0 \
NETWORKS=0 \
NODES=0 \
PING=1 \
PLUGINS=0 \
POST=0 \
SECRETS=0 \
SERVICES=0 \
SESSION=0 \
SWARM=0 \
SYSTEM=0 \
TASKS=0 \
VERSION=1 \
VOLUMES=0

ENV ADVANCED=0 \
PING=0 \
AUTH=0 \
BUILD=0 \
BUILD_PRUNE=0 \
COMMIT=0 \
CONFIGS=0 \
CONFIGS_CREATE=0 \
CONFIGS_ID=0 \
CONFIGS_ID_UPDATE=0 \
CONTAINERS_CREATE=0 \
CONTAINERS_JSON=0 \
CONTAINERS_PRUNE=0 \
CONTAINERS_ID=0 \
CONTAINERS_ID_ARCHIVE=0 \
CONTAINERS_ID_ATTACH=0 \
CONTAINERS_ID_ATTACH_WS=0 \
CONTAINERS_ID_CHANGES=0 \
CONTAINERS_ID_EXEC=0 \
CONTAINERS_ID_EXPORT=0 \
CONTAINERS_ID_JSON=0 \
CONTAINERS_ID_KILL=0 \
CONTAINERS_ID_LOGS=0 \
CONTAINERS_ID_PAUSE=0 \
CONTAINERS_ID_RENAME=0 \
CONTAINERS_ID_RESIZE=0 \
CONTAINERS_ID_RESTART=0 \
CONTAINERS_ID_START=0 \
CONTAINERS_ID_STATS=0 \
CONTAINERS_ID_STOP=0 \
CONTAINERS_ID_TOP=0 \
CONTAINERS_ID_UNPAUSE=0 \
CONTAINERS_ID_UPDATE=0 \
CONTAINERS_ID_WAIT=0 \
DISTRIBUTION_NAME_JSON=0 \
EVENTS=0 \
EXEC_ID_JSON=0 \
EXEC_ID_RESIZE=0 \
EXEC_ID_START=0 \
IMAGES_CREATE=0 \
IMAGES_GET=0 \
IMAGES_JSON=0 \
IMAGES_LOAD=0 \
IMAGES_PRUNE=0 \
IMAGES_SEARCH=0 \
IMAGES_NAME=0 \
IMAGES_NAME_GET=0 \
IMAGES_NAME_HISTORY=0 \
IMAGES_NAME_JSON=0 \
IMAGES_NAME_PUSH=0 \
IMAGES_NAME_TAG=0 \
INFO=0 \
NETWORKS=0 \
NETWORKS_CREATE=0 \
NETWORKS_PRUNE=0 \
NETWORKS_ID=0 \
NETWORKS_ID_CONNECT=0 \
NETWORKS_ID_DISCONNECT=0 \
NODES=0 \
NODES_ID=0 \
NODES_ID_UPDATE=0 \
PLUGINS=0 \
PLUGINS_CREATE=0 \
PLUGINS_PRIVILEGES=0 \
PLUGINS_PULL=0 \
PLUGINS_NAME=0 \
PLUGINS_NAME_DISABLE=0 \
PLUGINS_NAME_ENABLE=0 \
PLUGINS_NAME_JSON=0 \
PLUGINS_NAME_PUSH=0 \
PLUGINS_NAME_SET=0 \
PLUGINS_NAME_UPGRADE=0 \
SECRETS=0 \
SECRETS_CREATE=0 \
SECRETS_ID=0 \
SECRETS_ID_UPDATE=0 \
SERVICES=0 \
SERVICES_CREATE=0 \
SERVICES_ID=0 \
SERVICES_ID_LOGS=0 \
SERVICES_ID_UPDATE=0 \
SESSION=0 \
SWARM=0 \
SWARM_INIT=0 \
SWARM_JOIN=0 \
SWARM_LEAVE=0 \
SWARM_UNLOCK=0 \
SWARM_UNLOCKKEY=0 \
SWARM_UPDATE=0 \
SYSTEM_DF=0 \
TASKS=0 \
TASKS_ID=0 \
TASKS_ID_LOGS=0 \
VERSION=0 \
VOLUMES=0 \
VOLUMES_CREATE=0 \
VOLUMES_PRUNE=0 \
VOLUMES_NAME=0

# add local files
COPY root/ /
Expand Down
10 changes: 7 additions & 3 deletions root/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#!/bin/bash

if [[ $POST == 1 ]] && [[ $DISABLE_IPV6 == 1 ]]; then
if [[ $POST == 1 && $DISABLE_IPV6 == 1 && $ADVANCED == 0 ]]; then
envsubst "$(printf '${%s} ' $(bash -c "compgen -A variable"))" < /templates/default_post_ipv4.template > /run/default.conf
elif [[ $POST == 0 ]] && [[ $DISABLE_IPV6 == 1 ]]; then
elif [[ $POST == 0 && $DISABLE_IPV6 == 1 && $ADVANCED == 0 ]]; then
envsubst "$(printf '${%s} ' $(bash -c "compgen -A variable"))" < /templates/default_nopost_ipv4.template > /run/default.conf
elif [[ $POST == 1 ]]; then
elif [[ $POST == 1 && $ADVANCED == 0 ]]; then
envsubst "$(printf '${%s} ' $(bash -c "compgen -A variable"))" < /templates/default_post.template > /run/default.conf
elif [[ $DISABLE_IPV6 == 1 && $ADVANCED == 1 ]]; then
envsubst "$(printf '${%s} ' $(bash -c "compgen -A variable"))" < /templates/default_advanced_ipv4.template > /run/default.conf
elif [[ $ADVANCED == 1 ]]; then
envsubst "$(printf '${%s} ' $(bash -c "compgen -A variable"))" < /templates/default_advanced.template > /run/default.conf
else
envsubst "$(printf '${%s} ' $(bash -c "compgen -A variable"))" < /templates/default_nopost.template > /run/default.conf
fi
Expand Down
Loading