mirror of
https://github.com/ONLYOFFICE/build_tools.git
synced 2026-02-10 20:45:38 +08:00
Added Dockerfile, Readme, .js script (#222)
* Added Dockerfile, Readme, .js script * Added develop folder to check.yml
This commit is contained in:
9
develop/Dockerfile
Normal file
9
develop/Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM onlyoffice/documentserver:latest
|
||||
RUN apt-get update -y && \
|
||||
apt-get install git -y \
|
||||
openjdk-11-jdk -y \
|
||||
npm -y \
|
||||
npm install -g grunt-cli -y && \
|
||||
git clone --depth 1 https://github.com/ONLYOFFICE/build_tools.git var/www/onlyoffice/documentserver/build_tools && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
ENTRYPOINT python /var/www/onlyoffice/documentserver/build_tools/develop/run_build_js.py /var/www/onlyoffice/documentserver && /bin/sh -c /app/ds/run-document-server.sh
|
||||
46
develop/README.md
Normal file
46
develop/README.md
Normal file
@ -0,0 +1,46 @@
|
||||
# Docker
|
||||
|
||||
This directory containing instruction for developers,
|
||||
who want to change something in sdkjs or web-apps module,
|
||||
but don't want to compile pretty compilcated core product to make those changes.
|
||||
|
||||
## Installing ONLYOFFICE Docs
|
||||
|
||||
## How to use - Linux
|
||||
|
||||
**Note**: You need the latest Docker version installed.
|
||||
|
||||
You might need to pull **onlyoffice/documentserver** image:
|
||||
|
||||
**Note**: Do not prefix docker command with sudo.
|
||||
[This](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user)
|
||||
instruction show how to use docker without sudo.
|
||||
|
||||
```bash
|
||||
docker pull onlyoffice/documentserver
|
||||
```
|
||||
|
||||
### Create develop image
|
||||
|
||||
To create a image with the ability to include external non-minified sdkjs code,
|
||||
use the following command from the dockerfile directory:
|
||||
|
||||
```bash
|
||||
docker build -t documentserver-develop .
|
||||
```
|
||||
|
||||
**Note**: The dot at the end is required.
|
||||
|
||||
### Connecting external folders
|
||||
|
||||
To connect external folders to the container,
|
||||
you need to pass the "-v" parameter
|
||||
along with the relative paths to the required folders.
|
||||
|
||||
**For example, let's connect the external folders "sdkjs" and "web-apps" to the container:**
|
||||
|
||||
```bash
|
||||
docker run -i -t -d -p 80:80 --restart=always \
|
||||
-v /host-dir/sdkjs:/var/www/onlyoffice/documentserver/sdkjs \
|
||||
-v /host-dir/web-apps:/var/www/onlyoffice/documentserver/web-apps documentserver-develop
|
||||
```
|
||||
12
develop/run_build_js.py
Normal file
12
develop/run_build_js.py
Normal file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.append(sys.argv[1] + '/build_tools/scripts')
|
||||
import build_js
|
||||
import config
|
||||
import base
|
||||
|
||||
base.cmd_in_dir(sys.argv[1] + '/build_tools/', 'python', ['configure.py'])
|
||||
config.parse()
|
||||
|
||||
build_js.build_js_develop(sys.argv[1])
|
||||
Reference in New Issue
Block a user