mirror of
https://github.com/zokradonh/kopano-docker.git
synced 2026-08-23 14:22:54 +00:00
build fixes and readme improvements (#85)
* add compose to the build image * update readme * fine tuning for build container * directly pass commands to run script in build env * fix dockerfile so that everything can be build on Docker version 17.05.0-ce, build 9f07f0e-synology
This commit is contained in:
+4
-2
@@ -1,4 +1,6 @@
|
||||
FROM docker:18.09.0
|
||||
RUN apk add bash curl expect make nano jq
|
||||
FROM docker:18.09.1
|
||||
ENV COMPOSE_VERSION "1.23.2"
|
||||
RUN apk add bash curl expect make nano jq py-pip
|
||||
RUN pip install --no-cache-dir docker-compose==${COMPOSE_VERSION}
|
||||
WORKDIR /kopano-docker
|
||||
CMD ["bash"]
|
||||
|
||||
+7
-2
@@ -1,13 +1,18 @@
|
||||
Helper container for systems where build requirements (bash, curl, jq, make) are not available (for example on Synology)
|
||||
# Minimal build environment
|
||||
|
||||
Helper container for systems where build requirements (bash, curl, docker-compose, jq, make) are not available (for example on Synology)
|
||||
|
||||
Run the following command to enter the "build environment" (command may need to be run with `sudo` to work with the `docker` command):
|
||||
|
||||
```
|
||||
$ ./run.sh
|
||||
This script may need to be run as root to be able to use docker/docker-compose through it.
|
||||
bash-4.4$
|
||||
|
||||
```
|
||||
|
||||
(the first time it will take a moment before the bash prompt is displayed, since the container is built locally first)
|
||||
|
||||
Afterwards you can execute the `setup.sh` script, modify `.env` to your liking and run any make commands:
|
||||
|
||||
```
|
||||
@@ -63,4 +68,4 @@ Sending build context to Docker daemon 4.608kB
|
||||
[...]
|
||||
```
|
||||
|
||||
After exiting the container run `docker-compose up -d`, which will have the images started you previously built.
|
||||
This container also includes ´docker-compose´ for systems that can not be easily updated (again Synology). You can freely choose to use ´docker-compose up -d´ from inside of outside of this container.
|
||||
|
||||
+4
-2
@@ -1,8 +1,10 @@
|
||||
#!/bin/sh
|
||||
if [ ! $(id -u) -eq 0 ]; then
|
||||
echo "This script may need to be run as root to be able to use docker/docker-compose through it."
|
||||
fi
|
||||
docker run \
|
||||
--rm -it \
|
||||
-u $(id -u ${USER}):$(id -g ${USER}) \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v ${PWD}/..:/kopano-docker/ \
|
||||
$(docker build -q .)
|
||||
|
||||
$(docker build -q .) $@
|
||||
|
||||
Reference in New Issue
Block a user