2021-06-02 19:35:03 +02:00
|
|
|
# To build these production upgrade test images, say a Debian Buster system
|
2021-06-24 21:52:53 +02:00
|
|
|
# preinstalled with Zulip 3.4:
|
|
|
|
# docker build . -f Dockerfile.prod --build-arg=BASE_IMAGE=zulip/ci:buster --build-arg=VERSION=3.4 --tag=zulip/ci:buster-3.4
|
|
|
|
# docker push zulip/ci:buster-3.4
|
2021-06-02 19:35:03 +02:00
|
|
|
|
2021-06-24 21:52:53 +02:00
|
|
|
ARG BASE_IMAGE
|
|
|
|
FROM $BASE_IMAGE
|
2021-06-02 19:35:03 +02:00
|
|
|
|
|
|
|
# Remove already existing rabbitmq mnesia directory files
|
|
|
|
RUN sudo rm -rf /var/lib/rabbitmq/mnesia/*
|
|
|
|
|
|
|
|
# The bionic hack used in production suite
|
2021-06-24 21:01:35 +02:00
|
|
|
RUN if (. /etc/os-release && [ "$ID $VERSION_ID" = 'ubuntu 18.04' ]); then \
|
2021-06-02 19:35:03 +02:00
|
|
|
sudo sed -i '/^bind/s/bind.*/bind 0.0.0.0/' /etc/redis/redis.conf; \
|
2021-06-24 21:01:35 +02:00
|
|
|
fi
|
2021-06-02 19:35:03 +02:00
|
|
|
|
|
|
|
# Download the release tarball, start rabbitmq server and install the server
|
2021-06-24 21:52:53 +02:00
|
|
|
ARG VERSION
|
2021-06-02 19:35:03 +02:00
|
|
|
RUN cd $(mktemp -d) \
|
2021-07-13 21:00:50 +02:00
|
|
|
&& curl -fLO "https://www.zulip.org/dist/releases/zulip-server-$VERSION.tar.gz" \
|
2021-06-24 21:52:53 +02:00
|
|
|
&& tar -xf "zulip-server-$VERSION.tar.gz" \
|
2021-06-02 19:35:03 +02:00
|
|
|
&& sudo service rabbitmq-server start \
|
|
|
|
&& sudo service rabbitmq-server status \
|
2021-06-24 21:52:53 +02:00
|
|
|
&& sudo -s "./zulip-server-$VERSION/scripts/setup/install" --self-signed-cert --hostname 127.0.0.1 --email circleci@example.com
|
2021-06-02 19:35:03 +02:00
|
|
|
|
|
|
|
CMD ["/bin/sh"]
|