mirror of
https://github.com/zulip/docker-zulip.git
synced 2025-11-02 21:13:41 +00:00
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:
@@ -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 && \
|
||||
|
||||
20
README.md
20
README.md
@@ -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.
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user