From 02675d591b585461b8f0845b6919bf660dda1548 Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Tue, 25 Jun 2019 13:49:38 +0000 Subject: [PATCH] 2.0.0-debian-9-r0 release --- bitnami/nats/2/debian-9/Dockerfile | 21 +++++++++++ bitnami/nats/2/debian-9/docker-compose.yml | 9 +++++ bitnami/nats/2/debian-9/rootfs/entrypoint.sh | 38 ++++++++++++++++++++ bitnami/nats/docker-compose.yml | 2 +- 4 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 bitnami/nats/2/debian-9/Dockerfile create mode 100644 bitnami/nats/2/debian-9/docker-compose.yml create mode 100755 bitnami/nats/2/debian-9/rootfs/entrypoint.sh diff --git a/bitnami/nats/2/debian-9/Dockerfile b/bitnami/nats/2/debian-9/Dockerfile new file mode 100644 index 000000000000..ae64ea942c07 --- /dev/null +++ b/bitnami/nats/2/debian-9/Dockerfile @@ -0,0 +1,21 @@ +FROM bitnami/minideb:stretch +LABEL maintainer "Bitnami " + +# 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" ] diff --git a/bitnami/nats/2/debian-9/docker-compose.yml b/bitnami/nats/2/debian-9/docker-compose.yml new file mode 100644 index 000000000000..3467ebdb39dc --- /dev/null +++ b/bitnami/nats/2/debian-9/docker-compose.yml @@ -0,0 +1,9 @@ +version: '2' + +services: + nats: + image: bitnami/nats:2 + ports: + - '4222:4222' + - '6222:6222' + - '8222:8222' diff --git a/bitnami/nats/2/debian-9/rootfs/entrypoint.sh b/bitnami/nats/2/debian-9/rootfs/entrypoint.sh new file mode 100755 index 000000000000..5560fac5cf19 --- /dev/null +++ b/bitnami/nats/2/debian-9/rootfs/entrypoint.sh @@ -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" diff --git a/bitnami/nats/docker-compose.yml b/bitnami/nats/docker-compose.yml index 8c0d069ed7a1..3467ebdb39dc 100644 --- a/bitnami/nats/docker-compose.yml +++ b/bitnami/nats/docker-compose.yml @@ -2,7 +2,7 @@ version: '2' services: nats: - image: bitnami/nats:1 + image: bitnami/nats:2 ports: - '4222:4222' - '6222:6222'