|
1 |
| -## Installation |
2 |
| - |
3 |
| -### macOS & Windows |
4 |
| - |
5 |
| -Install Docker CE for Mac and Windows (http://docker.com) |
6 |
| - |
7 |
| -### Ubuntu |
8 |
| - |
9 |
| -To install Docker CE follow the instructions given here: |
10 |
| - |
11 |
| -https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/ |
12 |
| - |
13 |
| -### Red Hat Enterprise Linux (RHEL) |
| 1 | +### Build Fledge image |
14 | 2 |
|
15 | 3 | ```
|
16 |
| - sudo yum install yum-utils |
17 |
| - sudo yum-config-manager --enable rhui-REGION-rhel-server-extras |
18 |
| - sudo yum install docker |
19 |
| - sudo systemctl daemon-reload |
20 |
| - sudo systemctl restart docker |
| 4 | + $ docker build --no-cache --tag fledge:latest-ubuntu2004 -f Dockerfile . |
21 | 5 | ```
|
22 |
| -### Build fledge image |
| 6 | + |
| 7 | +Default will be built with the latest stable release. |
23 | 8 |
|
24 | 9 | ```
|
25 |
| - $ docker build --tag fledge:dev --build-arg FLEDGE_BRANCH=develop -f Dockerfile.ubuntu1804 . |
| 10 | + $ docker build --tag fledge:nightly-ubuntu2004-aarch64 --build-arg version=20.04 --build-arg arch=aarch64 --build-arg package_version=nightly --build-arg packages="fledge-south-lathe fledge-south-sinusoid fledge-north-http-north" -f Dockerfile . |
26 | 11 | ```
|
27 | 12 |
|
28 |
| -where name of the image is fledge, FLEDGE_BRANCH is the branch to build (develop, main, 1.5.2 ,etc) |
| 13 | +The image is referred to as fledge, and it is tagged as nightly-ubuntu2004-aarch64. The package_version denotes the version of the packages, such as latest, nightly, fixes/FOGL-XXXX. |
29 | 14 |
|
30 |
| -### Run container |
| 15 | +##### Build Arguments: |
31 | 16 |
|
| 17 | +a) **version** - The name of the Ubuntu version is either 18.04 or 20.04. By default, the version is 20.04. |
32 | 18 |
|
33 |
| -``` |
34 |
| - $ docker run -d -v ~/fledge-data:/usr/local/fledge/data --name fledge -p 8081:8081 -p 1995:1995 -p 8082:80 fledge:dev |
35 |
| -``` |
| 19 | +b) **arch** - The Ubuntu architecture is designated as either x86_64 or aarch64. The default architecture is x86_64. |
36 | 20 |
|
37 |
| - -d : run fledge container in detached mode |
38 |
| - -v : maps host volume /fledge-data to container volume /usr/local/fledge/data |
39 |
| - --name : name of the container (fledge) |
40 |
| - -p : map the port of host machine (8081) and container (:8081) |
41 |
| - fledge : name of the image created in earlier step |
| 21 | +c) **package_version** - The package version can be either the latest, nightly, or fixes/FOGL-XXXX. By default, it is set to nightly. |
| 22 | + |
| 23 | +d) **packages** - A compilation of packages delineated by spaces. For instance, packages="fledge-south-lathesim fledge-south-sinusoid fledge-north-http-north". |
| 24 | + |
| 25 | +e) **USERNAME** - Name of the non-root user. By default, it is fledge. |
42 | 26 |
|
43 |
| -> To attach to a running conatiner: `docker exec -it fledge bash` |
44 | 27 |
|
45 |
| -`--network host` mode makes the container use the host's network stack. |
| 28 | +### Run container |
| 29 | + |
46 | 30 |
|
47 |
| -### Stopping docker container |
48 | 31 | ```
|
49 |
| - $ docker stop fledge |
| 32 | + $ docker run -d --name fledge -p 8081:8081 -p 1995:1995 -p 8082:80 fledge:nightly-ubuntu2004-aarch64 |
50 | 33 | ```
|
51 | 34 |
|
52 |
| -> Note: The files in fledge-data directory are created by container which creates/runs them as root user. In order to read the fledge.db, you need to change the permission of fledge.db* files, sudo chmod 666 fledge.db* |
53 |
| -
|
54 |
| -### notes... |
| 35 | + -d : run fledge container in detached mode |
| 36 | + -p : map the ports, e.g host machine (8081) to container (:8081) |
55 | 37 |
|
56 |
| -docker save -o fledge-dev.tar fledge:dev |
57 | 38 |
|
| 39 | +To attach to a running container: `docker exec -it fledge bash` |
58 | 40 |
|
59 |
| -docker load < fledge-dev.tar.gz |
60 |
| -docker load --input fledge-dev.tar.gz |
61 | 41 |
|
62 |
| -docker run -d -v ~/fledge-data:/usr/local/fledge/data --name fledge -p 8081:8081 -p 1995:1995 -p 8082:80 fledge:dev |
63 |
| -docker run -d --name fledge -p 8081:8081 -p 1995:1995 -p 8082:80 fledge:dev |
0 commit comments