mirror of
https://github.com/bitnami/containers.git
synced 2026-04-07 07:29:28 +08:00
[bitnami/consul] Release 1.21.1-debian-12-r3 (#81978)
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
This commit is contained in:
@@ -8,10 +8,10 @@ ARG TARGETARCH
|
||||
|
||||
LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \
|
||||
org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
|
||||
org.opencontainers.image.created="2025-05-30T14:20:43Z" \
|
||||
org.opencontainers.image.created="2025-06-05T21:22:37Z" \
|
||||
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
|
||||
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/consul/README.md" \
|
||||
org.opencontainers.image.ref.name="1.21.1-debian-12-r2" \
|
||||
org.opencontainers.image.ref.name="1.21.1-debian-12-r3" \
|
||||
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/consul" \
|
||||
org.opencontainers.image.title="consul" \
|
||||
org.opencontainers.image.vendor="Broadcom, Inc." \
|
||||
@@ -29,7 +29,7 @@ RUN install_packages ca-certificates curl iproute2 procps zlib1g-dev
|
||||
RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ || exit 1 ; \
|
||||
COMPONENTS=( \
|
||||
"render-template-1.0.7-16-linux-${OS_ARCH}-debian-12" \
|
||||
"consul-1.21.1-0-linux-${OS_ARCH}-debian-12" \
|
||||
"consul-1.21.1-1-linux-${OS_ARCH}-debian-12" \
|
||||
) ; \
|
||||
for COMPONENT in "${COMPONENTS[@]}"; do \
|
||||
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
|
||||
@@ -44,6 +44,7 @@ RUN apt-get update && apt-get upgrade -y && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
||||
RUN chmod g+rwX /opt/bitnami
|
||||
RUN find / -perm /6000 -type f -exec chmod a-s {} \; || true
|
||||
RUN uninstall_packages curl
|
||||
|
||||
COPY rootfs /
|
||||
RUN /opt/bitnami/scripts/consul/postunpack.sh
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"arch": "amd64",
|
||||
"distro": "debian-12",
|
||||
"type": "NAMI",
|
||||
"version": "1.21.1-0"
|
||||
"version": "1.21.1-1"
|
||||
},
|
||||
"render-template": {
|
||||
"arch": "amd64",
|
||||
|
||||
26
bitnami/consul/1/debian-12/prebuildfs/usr/sbin/uninstall_packages
Executable file
26
bitnami/consul/1/debian-12/prebuildfs/usr/sbin/uninstall_packages
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
set -eu
|
||||
|
||||
n=0
|
||||
max=2
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
until [ $n -gt $max ]; do
|
||||
set +e
|
||||
(
|
||||
apt-get autoremove --purge -y "$@"
|
||||
)
|
||||
CODE=$?
|
||||
set -e
|
||||
if [ $CODE -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
if [ $n -eq $max ]; then
|
||||
exit $CODE
|
||||
fi
|
||||
echo "apt failed, retrying"
|
||||
n=$(($n + 1))
|
||||
done
|
||||
apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
||||
@@ -136,12 +136,12 @@ services:
|
||||
networks:
|
||||
- consul-network
|
||||
ports:
|
||||
- '8300:8300'
|
||||
- '8301:8301'
|
||||
- '8301:8301/udp'
|
||||
- '8500:8500'
|
||||
- '8600:8600'
|
||||
- '8600:8600/udp'
|
||||
- 8300:8300
|
||||
- 8301:8301
|
||||
- 8301:8301/udp
|
||||
- 8500:8500
|
||||
- 8600:8600
|
||||
- 8600:8600/udp
|
||||
```
|
||||
|
||||
Then, launch the containers using:
|
||||
@@ -163,21 +163,21 @@ version: '2'
|
||||
|
||||
services:
|
||||
consul-node1:
|
||||
image: bitnami/consul
|
||||
image: bitnami/consul:latest
|
||||
environment:
|
||||
- CONSUL_BOOTSTRAP_EXPECT=3
|
||||
- CONSUL_CLIENT_LAN_ADDRESS=0.0.0.0
|
||||
- CONSUL_DISABLE_KEYRING_FILE=true
|
||||
- CONSUL_RETRY_JOIN_ADDRESS=consul-node1
|
||||
ports:
|
||||
- '8300:8300'
|
||||
- '8301:8301'
|
||||
- '8301:8301/udp'
|
||||
- '8500:8500'
|
||||
- '8600:8600'
|
||||
- '8600:8600/udp'
|
||||
- 8300:8300
|
||||
- 8301:8301
|
||||
- 8301:8301/udp
|
||||
- 8500:8500
|
||||
- 8600:8600
|
||||
- 8600:8600/udp
|
||||
volumes:
|
||||
- 'consul-node1_data:/bitnami'
|
||||
- consul-node1_data:/bitnami
|
||||
```
|
||||
|
||||
> **Note:** The value of the **CONSUL_BOOTSTRAP_EXPECT** should reflect the total number of nodes the cluster will have.
|
||||
@@ -188,7 +188,7 @@ Update the definitions for nodes you want your HashiCorp Consul node cluster wit
|
||||
|
||||
```yaml
|
||||
consul-node2:
|
||||
image: bitnami/consul
|
||||
image: bitnami/consul:latest
|
||||
environment:
|
||||
- CONSUL_BOOTSTRAP_EXPECT=3
|
||||
- CONSUL_CLIENT_LAN_ADDRESS=0.0.0.0
|
||||
@@ -196,10 +196,10 @@ consul-node2:
|
||||
- CONSUL_RETRY_JOIN_ADDRESS=consul-node1
|
||||
- CONSUL_ENABLE_UI=false
|
||||
volumes:
|
||||
- 'consul-node2_data:/bitnami'
|
||||
- consul-node2_data:/bitnami
|
||||
|
||||
consul-node3:
|
||||
image: bitnami/consul
|
||||
image: bitnami/consul:latest
|
||||
environment:
|
||||
- CONSUL_BOOTSTRAP_EXPECT=3
|
||||
- CONSUL_CLIENT_LAN_ADDRESS=0.0.0.0
|
||||
@@ -207,7 +207,7 @@ consul-node3:
|
||||
- CONSUL_RETRY_JOIN_ADDRESS=consul-node1
|
||||
- CONSUL_ENABLE_UI=false
|
||||
volumes:
|
||||
- 'consul-node3_data:/bitnami'
|
||||
- consul-node3_data:/bitnami
|
||||
```
|
||||
|
||||
### Step 3: Add the volume description
|
||||
@@ -229,24 +229,24 @@ version: '2'
|
||||
|
||||
services:
|
||||
consul-node1:
|
||||
image: bitnami/consul
|
||||
image: bitnami/consul:latest
|
||||
environment:
|
||||
- CONSUL_BOOTSTRAP_EXPECT=3
|
||||
- CONSUL_CLIENT_LAN_ADDRESS=0.0.0.0
|
||||
- CONSUL_DISABLE_KEYRING_FILE=true
|
||||
- CONSUL_RETRY_JOIN_ADDRESS=consul-node1
|
||||
ports:
|
||||
- '8300:8300'
|
||||
- '8301:8301'
|
||||
- '8301:8301/udp'
|
||||
- '8500:8500'
|
||||
- '8600:8600'
|
||||
- '8600:8600/udp'
|
||||
- 8300:8300
|
||||
- 8301:8301
|
||||
- 8301:8301/udp
|
||||
- 8500:8500
|
||||
- 8600:8600
|
||||
- 8600:8600/udp
|
||||
volumes:
|
||||
- 'consul-node1_data:/bitnami'
|
||||
- consul-node1_data:/bitnami
|
||||
|
||||
consul-node2:
|
||||
image: bitnami/consul
|
||||
image: bitnami/consul:latest
|
||||
environment:
|
||||
- CONSUL_BOOTSTRAP_EXPECT=3
|
||||
- CONSUL_CLIENT_LAN_ADDRESS=0.0.0.0
|
||||
@@ -254,10 +254,10 @@ services:
|
||||
- CONSUL_RETRY_JOIN_ADDRESS=consul-node1
|
||||
- CONSUL_ENABLE_UI=false
|
||||
volumes:
|
||||
- 'consul-node2_data:/bitnami'
|
||||
- consul-node2_data:/bitnami
|
||||
|
||||
consul-node3:
|
||||
image: bitnami/consul
|
||||
image: bitnami/consul:latest
|
||||
environment:
|
||||
- CONSUL_BOOTSTRAP_EXPECT=3
|
||||
- CONSUL_CLIENT_LAN_ADDRESS=0.0.0.0
|
||||
@@ -265,7 +265,7 @@ services:
|
||||
- CONSUL_RETRY_JOIN_ADDRESS=consul-node1
|
||||
- CONSUL_ENABLE_UI=false
|
||||
volumes:
|
||||
- 'consul-node3_data:/bitnami'
|
||||
- consul-node3_data:/bitnami
|
||||
|
||||
volumes:
|
||||
consul-node1_data:
|
||||
@@ -418,7 +418,7 @@ docker run -e CONSUL_GOSSIP_ENCRYPTION_KEY=YOUR_GENERATED_KEY --name consul bitn
|
||||
consul:
|
||||
image: bitnami/consul:latest
|
||||
volumes:
|
||||
- '/local/path/to/your/confDir:/opt/bitnami/consul/conf'
|
||||
- /local/path/to/your/confDir:/opt/bitnami/consul/conf
|
||||
```
|
||||
|
||||
The container has a HashiCorp Consul configuration directory set up at /consul/config and the agent will load any configuration files placed here by binding a volume or by composing a new image and adding files. Alternatively, configuration can be added by passing the configuration JSON via environment variable CONSUL_LOCAL_CONFIG. If this is bind mounted then ownership will be changed to the consul user when the container starts.
|
||||
|
||||
Reference in New Issue
Block a user