docker: change zulip ENVs to ARGs for easier updating.

This way, only the compose file needs to be touched which is more in
line with other configuration options.
This commit is contained in:
xificurC
2018-08-03 11:05:06 +02:00
committed by Tim Abbott
parent f1196c80d8
commit 5583144c9d
3 changed files with 21 additions and 9 deletions

View File

@@ -5,8 +5,10 @@
FROM ubuntu:xenial-20171114
LABEL maintainer="Alexander Trost <galexrt@googlemail.com>"
ENV ZULIP_GIT_URL="https://github.com/zulip/zulip.git" \
ZULIP_GIT_REF="master"
# You can specify these in docker-compose.yml or with
# docker build --build-args "ZULIP_GIT_REF=git_branch_name" .
ARG ZULIP_GIT_URL=https://github.com/zulip/zulip.git
ARG ZULIP_GIT_REF=master
# First, we setup working locales
RUN echo 'APT::Install-Recommends 0;' >> /etc/apt/apt.conf.d/01norecommends && \

View File

@@ -367,21 +367,27 @@ you can find using `docker ps`)
### Upgrading from a Git repository
1. Edit `Dockerfile` in this directory to specify the Git repository
and the commit to use as `ZULIP_GIT_URL` and `ZULIP_GIT_REF`
(e.g. `master` or `1.8.1` or
`445932cc8613c77ced023125248c8b966b3b7528`).
2. Edit your `docker-compose.yml` to comment out the `image` line, e.g.:
1. Edit `docker-compose.yml` to comment out the `image` line, and
specify the Git commit you'd like to build the zulip container from.
E.g.:
```
zulip:
# image: "quay.io/galexrt/zulip:1.8.1-0"
build:
context: .
args:
# Change these if you want to build zulip from a different repo/branch
ZULIP_GIT_URL: https://github.com/zulip/zulip.git
ZULIP_GIT_REF: master
```
3. Run `docker-compose build zulip` to build a Zulip Docker image from
You can set `ZULIP_GIT_URL` to any clone of the zulip/zulip git
repository, and `ZULIP_GIT_REF` to be any ref name in that repository
(e.g. `master` or `1.8.1` or
`445932cc8613c77ced023125248c8b966b3b7528`).
2. Run `docker-compose build zulip` to build a Zulip Docker image from
the specified Git version.
Then stop and restart the container as described in the previous section.

View File

@@ -28,6 +28,10 @@ services:
image: "quay.io/galexrt/zulip:1.8.1-0"
build:
context: .
args:
# Change these if you want to build zulip from a different repo/branch
ZULIP_GIT_URL: https://github.com/zulip/zulip.git
ZULIP_GIT_REF: master
ports:
- "80:80"
- "443:443"