mirror of
https://github.com/bitnami/containers.git
synced 2026-03-01 06:57:49 +08:00
3.3.8-ol-7-r0 release
Initial release version 3.3.8
This commit is contained in:
30
bitnami/etcd/3/ol-7/Dockerfile
Normal file
30
bitnami/etcd/3/ol-7/Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM bitnami/oraclelinux-extras:7-r18 as buildenv
|
||||
|
||||
RUN install_packages ca-certificates wget
|
||||
RUN wget -nc -P /tmp/bitnami/pkg/cache/ https://downloads.bitnami.com/files/stacksmith/etcd-3.3.8-0-linux-x86_64-ol-7.tar.gz && \
|
||||
echo "0d4e165486b30b19068681b84c320f492ac987a27294bd9615c827d2e550377b /tmp/bitnami/pkg/cache/etcd-3.3.8-0-linux-x86_64-ol-7.tar.gz" | sha256sum -c - && \
|
||||
tar -zxf /tmp/bitnami/pkg/cache/etcd-3.3.8-0-linux-x86_64-ol-7.tar.gz -P --transform 's|^[^/]*/files|/opt/bitnami|' --wildcards '*/files' && \
|
||||
rm -rf /tmp/bitnami/pkg/cache/etcd-3.3.8-0-linux-x86_64-ol-7.tar.gz
|
||||
|
||||
##################
|
||||
|
||||
FROM bitnami/oraclelinux-extras:7-r18
|
||||
LABEL maintainer "Bitnami <containers@bitnami.com>"
|
||||
|
||||
COPY --from=buildenv /opt/bitnami/etcd /opt/bitnami/etcd
|
||||
ENV BITNAMI_APP_NAME="etcd" \
|
||||
BITNAMI_IMAGE_VERSION="3.3.8-ol-7-r0" \
|
||||
ETCD_ADVERTISE_CLIENT_URLS="http://127.0.0.1:2379" \
|
||||
ETCD_DATA_DIR="/opt/bitnami/etcd/data/" \
|
||||
ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379" \
|
||||
PATH="/opt/bitnami/etcd/bin:$PATH"
|
||||
|
||||
RUN chmod g+rwX /opt/bitnami/etcd
|
||||
|
||||
EXPOSE 2379 2380
|
||||
|
||||
COPY rootfs /
|
||||
WORKDIR /opt/bitnami/etcd
|
||||
USER 1001
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["etcd"]
|
||||
12
bitnami/etcd/3/ol-7/docker-compose.yml
Normal file
12
bitnami/etcd/3/ol-7/docker-compose.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
etcd:
|
||||
image: bitnami/etcd:3-ol-7
|
||||
environment:
|
||||
- ALLOW_NONE_AUTHENTICATION=yes
|
||||
volumes:
|
||||
- etcd_data:/bitnami
|
||||
volumes:
|
||||
etcd_data:
|
||||
driver: local
|
||||
40
bitnami/etcd/3/ol-7/rootfs/entrypoint.sh
Executable file
40
bitnami/etcd/3/ol-7/rootfs/entrypoint.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
##
|
||||
## @brief Helper function to show an error when ETCD_ROOT_PASSWORD does not enable the authentication
|
||||
## param $1 Input name
|
||||
##
|
||||
authentication_enabled_error() {
|
||||
echo "The $1 environment variable does not enable authentication. Set the environment variable ALLOW_NONE_AUTHENTICAION=yes to allow the container to be started without authentication. This is recommended only for development."
|
||||
exit 1
|
||||
}
|
||||
|
||||
##
|
||||
## @brief Helper function to show a warning when the ALLOW_NONE_AUTHENTICATION flag is enabled
|
||||
##
|
||||
authentication_enabled_warn() {
|
||||
echo "You set the environment variable ALLOW_NONE_AUTHENTICATION=${ALLOW_NONE_AUTHENTICATION}. For safety reasons, do not use this flag in a production environment."
|
||||
}
|
||||
|
||||
|
||||
# Validate authentication
|
||||
if [[ "$ALLOW_NONE_AUTHENTICATION" =~ ^(yes|Yes|YES)$ ]]; then
|
||||
authentication_enabled_warn
|
||||
elif [[ -z "$ETCD_ROOT_PASSWORD" ]]; then
|
||||
authentication_enabled_error ETCD_ROOT_PASSWORD
|
||||
fi
|
||||
|
||||
# Validate authentication
|
||||
if [[ ! -z "$ETCD_ROOT_PASSWORD" ]]; then
|
||||
echo "==> Enabling etcd authentication..."
|
||||
etcd > /dev/null 2>&1 &
|
||||
ETCD_PID=$!
|
||||
sleep 3
|
||||
echo "$ETCD_ROOT_PASSWORD" | etcdctl user add root
|
||||
etcdctl auth enable
|
||||
etcdctl -u root:"$ETCD_ROOT_PASSWORD" role revoke guest -path '/*' --readwrite
|
||||
kill $ETCD_PID
|
||||
fi
|
||||
|
||||
|
||||
exec "$@"
|
||||
@@ -30,7 +30,7 @@ $ docker-compose up
|
||||
# Supported tags and respective `Dockerfile` links
|
||||
|
||||
* [`3`, `3.3.8-r1`, `latest` (3/Dockerfile)](https://github.com/bitnami/bitnami-docker-etcd/blob/3.3.8-r1/3/Dockerfile)
|
||||
* [`3-ol-7`, `0.0.0-ol-7-r0` (3/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-etcd/blob/0.0.0-ol-7-r0/3/ol-7/Dockerfile)
|
||||
* [`3-ol-7`, `3.3.8-ol-7-r0` (3/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-etcd/blob/3.3.8-ol-7-r0/3/ol-7/Dockerfile)
|
||||
|
||||
Subscribe to project updates by watching the [bitnami/etcd GitHub repo](https://github.com/bitnami/bitnami-docker-etcd).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user