mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
Remove legacy (pre-Vagrant) Docker development environment setup.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
cd9c1bfb9d
commit
b4204e7cfd
@@ -33,8 +33,6 @@ development environment:
|
||||
**[install without using Vagrant][install-direct]**.
|
||||
* On **other Linux/UNIX** distributions, you'll need to follow slightly different
|
||||
instructions to **[install manually][install-generic]**.
|
||||
* On **macOS and Linux** (Ubuntu recommended), you can install **[using
|
||||
Docker][install-docker]**, though support for this remains experimental.
|
||||
|
||||
Unfortunately, the only supported method to install on Windows is the [Vagrant
|
||||
method][install-vagrant].
|
||||
@@ -84,7 +82,6 @@ machine, take a look at our tips for
|
||||
|
||||
[dev-remote]: remote.html
|
||||
[install-direct]: ../development/setup-advanced.html#installing-directly-on-ubuntu-debian-centos-or-fedora
|
||||
[install-docker]: ../development/setup-advanced.html#using-docker-experimental
|
||||
[install-generic]: ../development/setup-advanced.html#installing-manually-on-unix
|
||||
[install-vagrant]: ../development/setup-vagrant.html
|
||||
[self-install-remote]: #installing-remotely
|
||||
|
||||
@@ -5,7 +5,6 @@ Contents:
|
||||
* [Installing directly on Ubuntu, Debian, Centos, or Fedora](#installing-directly-on-ubuntu-debian-centos-or-fedora)
|
||||
* [Installing manually on other Linux/UNIX](#installing-manually-on-unix)
|
||||
* [Installing directly on cloud9](#installing-on-cloud9)
|
||||
* [Using Docker (experimental)](#using-docker-experimental)
|
||||
|
||||
## Installing directly on Ubuntu, Debian, Centos, or Fedora
|
||||
|
||||
@@ -259,110 +258,6 @@ automatically forward the connection. You might want to visit
|
||||
[wiki](https://github.com/cPhost/zulip-cloud9/wiki) for more info on
|
||||
how to use zulip-cloud9 package.
|
||||
|
||||
## Using Docker (experimental)
|
||||
|
||||
Start by [cloning your fork of the Zulip repository][zulip-rtd-git-cloning]
|
||||
and [connecting the Zulip upstream repository][zulip-rtd-git-connect]:
|
||||
|
||||
```
|
||||
git clone --config pull.rebase https://github.com/YOURUSERNAME/zulip.git
|
||||
git remote add -f upstream https://github.com/zulip/zulip.git
|
||||
```
|
||||
|
||||
The docker instructions for development are experimental, so they may
|
||||
have bugs. If you try them and run into any issues, please report
|
||||
them!
|
||||
|
||||
You can also use Docker to run a Zulip development environment.
|
||||
First, you need to install Docker in your development machine
|
||||
following the [instructions][docker-install]. Some other interesting
|
||||
links for somebody new in Docker are:
|
||||
|
||||
* [Get Started](https://docs.docker.com/get-started/)
|
||||
* [Understand the architecture](https://docs.docker.com/engine/docker-overview/)
|
||||
* [Docker run reference](https://docs.docker.com/engine/reference/run/)
|
||||
* [Dockerfile reference](https://docs.docker.com/engine/reference/builder/)
|
||||
|
||||
[docker-install]: https://docs.docker.com/engine/installation/
|
||||
|
||||
Then you should create the Docker image based on Ubuntu Linux, first
|
||||
go to the directory with the Zulip source code:
|
||||
|
||||
```
|
||||
docker build -t user/zulipdev -f Dockerfile-dev .
|
||||
```
|
||||
|
||||
|
||||
Commit and tag the provisioned images. The below will install Zulip's dependencies:
|
||||
```
|
||||
docker run -itv $(pwd):/srv/zulip -p 9991:9991 user/zulipdev /bin/bash
|
||||
$ /bin/bash sudo chown -R zulip:zulip /srv/zulip
|
||||
$ /bin/bash /srv/zulip/tools/provision --docker
|
||||
docker ps -af ancestor=user/zulipdev
|
||||
docker commit -m "Zulip installed" <container id> user/zulipdev:v2
|
||||
```
|
||||
|
||||
Now you can run the docker server with:
|
||||
|
||||
```
|
||||
docker run -itv $(pwd):/srv/zulip -p 9991:9991 user/zulipdev:v2 \
|
||||
/srv/zulip/tools/start-dockers
|
||||
```
|
||||
|
||||
You'll want to
|
||||
[read the guide for Zulip development](../development/setup-vagrant.html#step-4-developing)
|
||||
to understand how to use the Zulip development. Note that
|
||||
`start-dockers` automatically runs `tools/run-dev.py` inside the
|
||||
container; you can then visit http://localhost:9991 to connect to your
|
||||
new Zulip Docker container.
|
||||
|
||||
|
||||
To view the container's `run-dev.py` console logs to get important
|
||||
debugging information (and e.g. outgoing emails) printed by the Zulip
|
||||
development environment, you can use:
|
||||
```
|
||||
docker logs --follow <container id>
|
||||
```
|
||||
|
||||
To restart the server use:
|
||||
```
|
||||
docker ps
|
||||
docker restart <container id>
|
||||
```
|
||||
|
||||
To stop the server use:
|
||||
```
|
||||
docker ps
|
||||
docker kill <container id>
|
||||
```
|
||||
|
||||
If you want to connect to the Docker instance to run commands
|
||||
(e.g. build a release tarball), you can use:
|
||||
|
||||
```
|
||||
docker ps
|
||||
docker exec -it <container id> /bin/bash
|
||||
$ source /home/zulip/.bash_profile
|
||||
$ <Your commands>
|
||||
$ exit
|
||||
```
|
||||
|
||||
If you want to run all the tests you need to start the servers first,
|
||||
you can do it with:
|
||||
|
||||
```
|
||||
docker run -itv $(pwd):/srv/zulip user/zulipdev:v2 /bin/bash
|
||||
$ tools/test-all-docker
|
||||
```
|
||||
|
||||
You can modify the source code in your development machine and review
|
||||
the results in your browser.
|
||||
|
||||
|
||||
Currently, the Docker workflow is substantially less convenient than
|
||||
the Vagrant workflow and less documented; please contribute to this
|
||||
guide and the Docker tooling if you are using Docker to develop Zulip!
|
||||
|
||||
[zulip-rtd-git-cloning]: ../git/cloning.html#step-1b-clone-to-your-machine
|
||||
[zulip-rtd-git-connect]: ../git/cloning.html#step-1c-connect-your-fork-to-zulip-upstream
|
||||
[port-forward-setup]: ../development/remote.html#running-the-development-server
|
||||
|
||||
Reference in New Issue
Block a user