Merge pull request #1 from bitnami/remove_debian_8
Removed Debian 8 from root version folders
This commit is contained in:
commit
b092338be2
|
|
@ -1,31 +0,0 @@
|
|||
FROM bitnami/minideb:jessie 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-3-linux-x64-debian-8.tar.gz && \
|
||||
echo "36116bbf249b52c397128f33497b72ab1c878f10bd54ae13eb289a215b3f26c8 /tmp/bitnami/pkg/cache/etcd-3.3.8-3-linux-x64-debian-8.tar.gz" | sha256sum -c - && \
|
||||
tar -zxf /tmp/bitnami/pkg/cache/etcd-3.3.8-3-linux-x64-debian-8.tar.gz -P --transform 's|^[^/]*/files|/opt/bitnami|' --wildcards '*/files' && \
|
||||
rm -rf /tmp/bitnami/pkg/cache/etcd-3.3.8-3-linux-x64-debian-8.tar.gz
|
||||
|
||||
##################
|
||||
|
||||
FROM bitnami/minideb:jessie
|
||||
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-debian-8-r21" \
|
||||
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 install_packages ca-certificates
|
||||
RUN chmod g+rwX /opt/bitnami/etcd
|
||||
|
||||
EXPOSE 2379 2380
|
||||
|
||||
COPY rootfs /
|
||||
WORKDIR /opt/bitnami/etcd
|
||||
USER 1001
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["etcd"]
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
version: '2'
|
||||
|
||||
services:
|
||||
etcd:
|
||||
image: bitnami/etcd:3
|
||||
environment:
|
||||
- ALLOW_NONE_AUTHENTICATION=yes
|
||||
volumes:
|
||||
- etcd_data:/bitnami
|
||||
volumes:
|
||||
etcd_data:
|
||||
driver: local
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
#!/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 "$@"
|
||||
Loading…
Reference in New Issue