From 63fc9e24402f365c3156e55fa8730772b91cb827 Mon Sep 17 00:00:00 2001 From: Nadezhda Fedorova Date: Fri, 21 Jun 2024 13:20:47 +0300 Subject: [PATCH] add images postgresql rabbitmq --- org/alt/postgresql/Dockerfile.template | 20 ++++++++++++++++++++ org/alt/postgresql/README.md | 16 ++++++++++++++++ org/alt/postgresql/test | 1 + org/alt/rabbitmq/Dockerfile.template | 19 +++++++++++++++++++ org/alt/rabbitmq/README.md | 18 ++++++++++++++++++ org/alt/rabbitmq/test | 1 + 6 files changed, 75 insertions(+) create mode 100644 org/alt/postgresql/Dockerfile.template create mode 100644 org/alt/postgresql/README.md create mode 100644 org/alt/postgresql/test create mode 100644 org/alt/rabbitmq/Dockerfile.template create mode 100644 org/alt/rabbitmq/README.md create mode 100644 org/alt/rabbitmq/test diff --git a/org/alt/postgresql/Dockerfile.template b/org/alt/postgresql/Dockerfile.template new file mode 100644 index 0000000..fcb115d --- /dev/null +++ b/org/alt/postgresql/Dockerfile.template @@ -0,0 +1,20 @@ +FROM {{ registry }}{{ organization }}/base:{{ branch }} + +MAINTAINER alt-cloud + +LABEL org.opencontainers.image.title="postgresql16" +LABEL org.opencontainers.image.description="PostgreSQL rograms and libraries" +LABEL org.opencontainers.image.source="https://github.com/postgres/postgres" +LABEL org.opencontainers.image.licenses="PostgreSQL" +LABEL org.opencontainers.image.vendor="ALT Linux Team" + +{{ install_packages("postgresql16","postgresql16-server") }} + +RUN usermod -a -G postgres postgres +RUN chown -R postgres:postgres /var/lib/pgsql + +USER postgres +WORKDIR /var/lib/pgsql +EXPOSE 5432 +VOLUME [ "/var/lib/pgsql/data" ] + diff --git a/org/alt/postgresql/README.md b/org/alt/postgresql/README.md new file mode 100644 index 0000000..41d4b8a --- /dev/null +++ b/org/alt/postgresql/README.md @@ -0,0 +1,16 @@ +dockerfiles-alt-postgresql +========================== + +ALT dockerfile for postgresql. + +Copy Dockerfile somewhere and build the image: +`$ docker build --rm -t /postgresql .` + +And launch the rabbitmq-server container: +`docker run -d -p 5432:5432 --name="postgresql" -v pgsql-data:/var/lib/pgsql/data IMAGENAME` + +First steps to start service and create db: +`/usr/bin/initdb /var/lib/pgsql/data` +`/usr/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start` +`/usr/bin/createdb mydb` +`psql mydb` diff --git a/org/alt/postgresql/test b/org/alt/postgresql/test new file mode 100644 index 0000000..691cfd5 --- /dev/null +++ b/org/alt/postgresql/test @@ -0,0 +1 @@ +pg_ctl --version diff --git a/org/alt/rabbitmq/Dockerfile.template b/org/alt/rabbitmq/Dockerfile.template new file mode 100644 index 0000000..82a472b --- /dev/null +++ b/org/alt/rabbitmq/Dockerfile.template @@ -0,0 +1,19 @@ +FROM {{ registry }}{{ organization }}/base:{{ branch }} + +MAINTAINER alt-cloud + +LABEL org.opencontainers.image.title="rabbitmq" +LABEL org.opencontainers.image.description="The RabbitMQ server" +LABEL org.opencontainers.image.source="https://github.com/rabbitmq/rabbitmq-server" +LABEL org.opencontainers.image.licenses="MPL-1.1" +LABEL org.opencontainers.image.vendor="ALT Linux Team" + +{{ install_packages("rabbitmq-server") }} + +USER rabbitmq +WORKDIR /var/lib/rabbitmq +EXPOSE 5672 25672 +VOLUME [ "/var/lib/rabbitmq", "/etc/rabbitmq" ] + +ENTRYPOINT [ "/usr/sbin/rabbitmq-server" ] +CMD ["start", "rabbitmq"] diff --git a/org/alt/rabbitmq/README.md b/org/alt/rabbitmq/README.md new file mode 100644 index 0000000..43a966d --- /dev/null +++ b/org/alt/rabbitmq/README.md @@ -0,0 +1,18 @@ +dockerfiles-alt-rabbitmq +======================== + +ALT dockerfile for rabbitmq. + +Copy Dockerfile somewhere and build the image: +`$ docker build --rm -t /rabbitmq .` + +And launch the rabbitmq-server container: +`docker run -d -p 5672:5672 --name="rabbitmq" -v rabbit-data:/var/lib/rabbitmq -v rabbit-conf:/etc/rabbitmq IMAGENAME` + +With mounting /etc/rabbitmq/rabbitmq-env.conf could be change settings of rabbitmq-server. + +It could be test via: +`curl localhost:5672` + +For starting app: +`rabbitmqctl start_app` diff --git a/org/alt/rabbitmq/test b/org/alt/rabbitmq/test new file mode 100644 index 0000000..ea95b55 --- /dev/null +++ b/org/alt/rabbitmq/test @@ -0,0 +1 @@ +rabbitmqctl version