diff --git a/bitnami/memcached/1/debian-11/Dockerfile b/bitnami/memcached/1/debian-11/Dockerfile index 037bb5aec355..2ebcd3c66b49 100644 --- a/bitnami/memcached/1/debian-11/Dockerfile +++ b/bitnami/memcached/1/debian-11/Dockerfile @@ -7,10 +7,10 @@ ARG TARGETARCH LABEL com.vmware.cp.artifact.flavor="sha256:1e1b4657a77f0d47e9220f0c37b9bf7802581b93214fff7d1bd2364c8bf22e8e" \ org.opencontainers.image.base.name="docker.io/bitnami/minideb:bullseye" \ - org.opencontainers.image.created="2024-02-16T12:54:44Z" \ + org.opencontainers.image.created="2024-02-19T12:19:05Z" \ org.opencontainers.image.description="Application packaged by VMware, Inc" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="1.6.23-debian-11-r20" \ + org.opencontainers.image.ref.name="1.6.23-debian-11-r21" \ org.opencontainers.image.title="memcached" \ org.opencontainers.image.vendor="VMware, Inc." \ org.opencontainers.image.version="1.6.23" diff --git a/bitnami/memcached/1/debian-11/rootfs/opt/bitnami/scripts/memcached-env.sh b/bitnami/memcached/1/debian-11/rootfs/opt/bitnami/scripts/memcached-env.sh index 9a8e7e62ea3f..5947443066e7 100644 --- a/bitnami/memcached/1/debian-11/rootfs/opt/bitnami/scripts/memcached-env.sh +++ b/bitnami/memcached/1/debian-11/rootfs/opt/bitnami/scripts/memcached-env.sh @@ -51,6 +51,7 @@ unset memcached_env_vars # Paths export MEMCACHED_BASE_DIR="${BITNAMI_ROOT_DIR}/memcached" export MEMCACHED_CONF_DIR="${MEMCACHED_BASE_DIR}/conf" +export MEMCACHED_DEFAULT_CONF_DIR="${MEMCACHED_BASE_DIR}/conf.default" export MEMCACHED_BIN_DIR="${MEMCACHED_BASE_DIR}/bin" export PATH="${MEMCACHED_BIN_DIR}:${BITNAMI_ROOT_DIR}/common/bin:${PATH}" diff --git a/bitnami/memcached/1/debian-11/rootfs/opt/bitnami/scripts/memcached/entrypoint.sh b/bitnami/memcached/1/debian-11/rootfs/opt/bitnami/scripts/memcached/entrypoint.sh index 5a8ff6c579df..21d8750c20a2 100755 --- a/bitnami/memcached/1/debian-11/rootfs/opt/bitnami/scripts/memcached/entrypoint.sh +++ b/bitnami/memcached/1/debian-11/rootfs/opt/bitnami/scripts/memcached/entrypoint.sh @@ -19,6 +19,12 @@ set -o pipefail print_welcome_page +# We add the copy from default config in the entrypoint to not break users +# bypassing the setup.sh logic. If the file already exists do not overwrite (in +# case someone mounts a configuration file in /opt/bitnami/memcached/conf) +debug "Copying files from $MEMCACHED_DEFAULT_CONF_DIR to $MEMCACHED_CONF_DIR" +cp -nfr "$MEMCACHED_DEFAULT_CONF_DIR"/. "$MEMCACHED_CONF_DIR" + if [[ "$*" = *"/opt/bitnami/scripts/memcached/run.sh"* || "$*" = *"/run.sh"* ]]; then info "** Starting Memcached setup **" /opt/bitnami/scripts/memcached/setup.sh diff --git a/bitnami/memcached/1/debian-11/rootfs/opt/bitnami/scripts/memcached/postunpack.sh b/bitnami/memcached/1/debian-11/rootfs/opt/bitnami/scripts/memcached/postunpack.sh index 4bf828965723..edbf0e04e4ca 100755 --- a/bitnami/memcached/1/debian-11/rootfs/opt/bitnami/scripts/memcached/postunpack.sh +++ b/bitnami/memcached/1/debian-11/rootfs/opt/bitnami/scripts/memcached/postunpack.sh @@ -21,3 +21,7 @@ for dir in "$MEMCACHED_CONF_DIR" "$SASL_CONF_PATH"; do ensure_dir_exists "$dir" chmod -R g+rwX "$dir" done + +# Copy all initially generated configuration files to the default directory +# (this is to avoid breaking when entrypoint is being overridden) +cp -r "${MEMCACHED_CONF_DIR}/"* "$MEMCACHED_DEFAULT_CONF_DIR" \ No newline at end of file diff --git a/bitnami/memcached/README.md b/bitnami/memcached/README.md index 264c9e8366d2..d6f516217946 100644 --- a/bitnami/memcached/README.md +++ b/bitnami/memcached/README.md @@ -148,20 +148,21 @@ docker-compose up -d #### Read-only environment variables -| Name | Description | Value | -|--------------------------|---------------------------------------------|---------------------------------------| -| `MEMCACHED_BASE_DIR` | Memcached installation directory. | `${BITNAMI_ROOT_DIR}/memcached` | -| `MEMCACHED_CONF_DIR` | Memcached configuration directory. | `${MEMCACHED_BASE_DIR}/conf` | -| `MEMCACHED_BIN_DIR` | Memcached directory for binary executables. | `${MEMCACHED_BASE_DIR}/bin` | -| `MEMCACHED_TMP_DIR` | Memcached directory for temporary files. | `${MEMCACHED_BASE_DIR}/tmp` | -| `MEMCACHED_LOGS_DIR` | Memcached directory for logs. | `${MEMCACHED_BASE_DIR}/logs` | -| `MEMCACHED_LOG_FILE` | Path to the Memcached log file. | `${MEMCACHED_LOGS_DIR}/memcached.log` | -| `MEMCACHED_PID_FILE` | Path to the Memcached PID file. | `${MEMCACHED_TMP_DIR}/memcached.pid` | -| `SASL_CONF_PATH` | Memcached SASL configuration directory. | `${MEMCACHED_CONF_DIR}/sasl2` | -| `SASL_CONF_FILE` | Memcached SASL configuration | `${SASL_CONF_PATH}/memcached.conf` | -| `SASL_DB_FILE` | Memcached SASL database file. | `${SASL_CONF_PATH}/memcachedsasldb` | -| `MEMCACHED_DAEMON_USER` | Memcached system user. | `memcached` | -| `MEMCACHED_DAEMON_GROUP` | Memcached system group. | `memcached` | +| Name | Description | Value | +|------------------------------|---------------------------------------------|---------------------------------------| +| `MEMCACHED_BASE_DIR` | Memcached installation directory. | `${BITNAMI_ROOT_DIR}/memcached` | +| `MEMCACHED_CONF_DIR` | Memcached configuration directory. | `${MEMCACHED_BASE_DIR}/conf` | +| `MEMCACHED_DEFAULT_CONF_DIR` | Memcached configuration directory. | `${MEMCACHED_BASE_DIR}/conf.default` | +| `MEMCACHED_BIN_DIR` | Memcached directory for binary executables. | `${MEMCACHED_BASE_DIR}/bin` | +| `MEMCACHED_TMP_DIR` | Memcached directory for temporary files. | `${MEMCACHED_BASE_DIR}/tmp` | +| `MEMCACHED_LOGS_DIR` | Memcached directory for logs. | `${MEMCACHED_BASE_DIR}/logs` | +| `MEMCACHED_LOG_FILE` | Path to the Memcached log file. | `${MEMCACHED_LOGS_DIR}/memcached.log` | +| `MEMCACHED_PID_FILE` | Path to the Memcached PID file. | `${MEMCACHED_TMP_DIR}/memcached.pid` | +| `SASL_CONF_PATH` | Memcached SASL configuration directory. | `${MEMCACHED_CONF_DIR}/sasl2` | +| `SASL_CONF_FILE` | Memcached SASL configuration | `${SASL_CONF_PATH}/memcached.conf` | +| `SASL_DB_FILE` | Memcached SASL database file. | `${SASL_CONF_PATH}/memcachedsasldb` | +| `MEMCACHED_DAEMON_USER` | Memcached system user. | `memcached` | +| `MEMCACHED_DAEMON_GROUP` | Memcached system group. | `memcached` | ### Specify the cache size