2.0.0-debian-9-r0 release

This commit is contained in:
Bitnami Bot
2019-06-25 13:49:38 +00:00
parent beb74d6988
commit 02675d591b
4 changed files with 69 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
FROM bitnami/minideb:stretch
LABEL maintainer "Bitnami <containers@bitnami.com>"
# Install required system packages and dependencies
RUN install_packages ca-certificates curl wget
RUN wget -nc -P /tmp/bitnami/pkg/cache/ https://downloads.bitnami.com/files/stacksmith/nats-2.0.0-0-linux-amd64-debian-9.tar.gz && \
echo "13f08f280c448f2cb29de0d0084592b3c4216246d3a1bc2811f0059ce433236f /tmp/bitnami/pkg/cache/nats-2.0.0-0-linux-amd64-debian-9.tar.gz" | sha256sum -c - && \
tar -zxf /tmp/bitnami/pkg/cache/nats-2.0.0-0-linux-amd64-debian-9.tar.gz -P --transform 's|^[^/]*/files|/opt/bitnami|' --wildcards '*/files' && \
rm -rf /tmp/bitnami/pkg/cache/nats-2.0.0-0-linux-amd64-debian-9.tar.gz
COPY rootfs /
RUN chown -R 1001:root /opt/bitnami/nats && chmod g+rwX /opt/bitnami/nats
ENV BITNAMI_APP_NAME="nats" \
BITNAMI_IMAGE_VERSION="2.0.0-debian-9-r0" \
PATH="/opt/bitnami/nats/bin:$PATH"
EXPOSE 4222 6222 8222
WORKDIR /opt/bitnami/nats
USER 1001
ENTRYPOINT [ "/entrypoint.sh" ]

View File

@@ -0,0 +1,9 @@
version: '2'
services:
nats:
image: bitnami/nats:2
ports:
- '4222:4222'
- '6222:6222'
- '8222:8222'

View File

@@ -0,0 +1,38 @@
#!/bin/bash
CONF_FILE='/opt/bitnami/nats/nats-server.conf';
if [ ! -e ${CONF_FILE} ]; then
echo "==> Writing config file..."
cat > ${CONF_FILE} << EOF
# Client port of 4222 on all interfaces
port: 4222
# HTTP monitoring port
monitor_port: 8222
# This is for clustering multiple servers together.
cluster {
# Route connections to be received on any interface on port 6222
port: 6222
# Routes are protected, so need to use them with --routes flag
# e.g. --routes=nats-route://ruser:T0pS3cr3t@otherdockerhost:6222
authorization {
user: ruser
password: T0pS3cr3t
timeout: 2
}
# Routes are actively solicited and connected to from this server.
# This Docker image has none by default, but you can pass a
# flag to the nats-server docker image to create one to an existing server.
routes = []
}
EOF
else
echo "==> Detected config file. It would be used instead of creating one."
fi
exec nats-server -c "$CONF_FILE"

View File

@@ -2,7 +2,7 @@ version: '2'
services:
nats:
image: bitnami/nats:1
image: bitnami/nats:2
ports:
- '4222:4222'
- '6222:6222'