mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-07 16:54:13 +01:00
Building: describe how to build and test packages
This commit is contained in:
parent
f532e3244b
commit
e7f8caa752
@ -1,12 +1,6 @@
|
||||
## REQIUREMENTS
|
||||
Docker CE
|
||||
|
||||
# Build the www webpack
|
||||
```
|
||||
docker build -t kasmweb/www -f builder/dockerfile.www.build .
|
||||
docker run -it --rm -v $PWD/builder/www:/build kasmweb/www:latest
|
||||
```
|
||||
|
||||
# Build a deb/rpm package
|
||||
```
|
||||
# builder/build-package <os> <os_codename>
|
||||
@ -22,29 +16,55 @@ builder/build-package centos core # CentOS 7
|
||||
builder/build-package fedora thirtythree
|
||||
```
|
||||
|
||||
# build the docker image
|
||||
# Build and test a package
|
||||
```
|
||||
cd /src_code_root
|
||||
docker build -t kasmvncbuilder:18.04 -f builder/dockerfile.ubuntu1804.build .
|
||||
builder/build-and-test-deb ubuntu focal
|
||||
builder/build-and-test-rpm centos core
|
||||
```
|
||||
|
||||
### Run the builder
|
||||
```sh
|
||||
mkdir -p builder/build
|
||||
docker run -v /tmp:/build --rm kasmvncbuilder:18.04
|
||||
cp /tmp/build/kasmvnc.ubuntu_18.04.tar.gz builder/build/
|
||||
open browser and point to https://<ip-address>/
|
||||
|
||||
3 default users are created:
|
||||
* 'foo' with default password 'foobar'. It can use mouse and keyboard.
|
||||
* 'foo-ro' with default password 'foobar'. It can only view.
|
||||
* 'foo-owner' with default password 'foobar'. It can manage other users.
|
||||
|
||||
# Test a package
|
||||
|
||||
If you want to test deb/rpm package you already built, please use this:
|
||||
```
|
||||
builder/test-deb ubuntu focal
|
||||
```
|
||||
It will install the package inside a new container.
|
||||
|
||||
# Package development
|
||||
|
||||
## deb/rpm package building and testing
|
||||
|
||||
First, a tarball is built, and then its files are copied to deb/rpm package as
|
||||
it is being built.
|
||||
Package testing stage installs the deb/rpm package in a fresh docker container
|
||||
and runs KasmVNC.
|
||||
|
||||
```
|
||||
builder/build-tarball debian buster
|
||||
builder/build-deb debian buster
|
||||
builder/test-deb debian buster
|
||||
```
|
||||
|
||||
### Build test desktop container
|
||||
```sh
|
||||
cd builder
|
||||
docker build -t kasmvnctester:18.04 -f dockerfile.ubuntu1804.test .
|
||||
```
|
||||
`build-and-test-deb` is good to do the whole dev lifecycle, but to iterate
|
||||
quickly, you'll need to skip building tarball (which takes a long time), and
|
||||
just build your deb/rpm with `build-deb` and test with `test-deb`.
|
||||
|
||||
### run an instance of the new destkop
|
||||
```sh
|
||||
docker run -it -p 443:8443 --rm -e "VNC_USER=username" -e "VNC_PW=password123" kasmvnctester:18.04
|
||||
```
|
||||
`build-rpm` and `test-rpm` are also available.
|
||||
|
||||
open browser and point to https://<ip-address>/vnc.html
|
||||
The username and password were set in the docker run command
|
||||
## Ensuring packages have all dependencies they need.
|
||||
|
||||
If you're working on a deb/rpm package, testing that it has all necessary
|
||||
dependencies is done via testing in a barebones environment (read: no XFCE). In
|
||||
this way we can be sure that runtime dependencies aren't met accidentally by
|
||||
packages installed with XFCE.
|
||||
|
||||
```
|
||||
builder/test-deb-barebones ubuntu focal
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user