├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.MD ├── SECURITY.md ├── archive ├── README.md ├── balena │ ├── etc │ │ ├── balena-engine │ │ │ └── daemon.json │ │ ├── ethertypes │ │ ├── init.d │ │ │ └── balena │ │ └── iptables │ │ │ ├── ip6tables.rules │ │ │ └── iptables.rules │ └── usr │ │ └── share │ │ └── doc │ │ └── balenaEngine │ │ └── README.md └── docker │ ├── etc │ ├── docker │ │ └── daemon.json │ ├── ethertypes │ ├── init.d │ │ └── docker │ └── iptables │ │ ├── ip6tables.rules │ │ └── iptables.rules │ └── usr │ └── share │ └── doc │ └── docker-ce │ └── README.md ├── picture └── portainer.io.png └── setup.sh /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at [OSSPLCnext@phoenixcontact.com](mailto:OSSPLCnext@phoenixcontact.com). All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This is an open source project, and we appreciate your help! 4 | 5 | We use the GitHub issue tracker to discuss new features and bugs. 6 | 7 | In addition to the issue tracker, the PLCnext Technology [Forum](https://www.plcnext-community.net/index.php?option=com_easydiscuss&view=categories&Itemid=221&lang=en) is the best way to get into contact with the project's maintainers. 8 | 9 | To contribute code or documentation for available projects, please use an issue with an *easy-pick* label. 10 | Our [maintainers](MAINTAINERS.md) will review and implement the changes. 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Phoenix Contact GmbH & Co KG 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | ~~# PLCnext Technology compatible container runtimes - Docker, Moby, balenaEngine~~ 2 | 3 | [![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) 4 | [![Web](https://img.shields.io/badge/PLCnext-Website-blue.svg)](https://www.phoenixcontact.com/plcnext) 5 | [![Community](https://img.shields.io/badge/PLCnext-Community-blue.svg)](https://www.plcnext-community.net) 6 | 7 | ## Project details 8 | 9 | **This project and the App are discontinued!!** 10 | > PLCnext Technology has a preinstalled podman and podman-compose, available as root, for testing purpose only. For productive use, podman and podman-compose will be available rootless for the admin user and for PLCnext Technology app developer starting with firmware 2025.0. 11 | 12 | |Description | Value | 13 | |--------------|------------| 14 | |Created | 18.02.2020 | 15 | |Last modified | 23.10.2024 | 16 | |Controller | AXC F 1152; AXC F 2152; AXC F 3152 | 17 | |Firmware | 2021.0 LTS | 18 | 19 | ## Changes for PLCnext firmware 2021.0 LTS 20 | 21 | - `iptables-nft` is now part of the FW image 22 | - Publish as APP in [PLCnext Store](https://www.plcnextstore.com/) 23 | - Added docker as installation option 24 | - Removed the version selection (only the default versions of balena and docker are stable) 25 | - Fixed docker-dompose 26 | - Fixed issue with the PLCnext firewall and WBM 27 | 28 | For the difference between Docker and balenaEngine, see [https://www.balena.io/engine/](https://www.balena.io/engine/) 29 | 30 | **Known issues:** 31 | 32 | - Factory reset does not remove application images and cache. 33 | - server certificate verification failed due to an incorrect system time 34 | 35 | > Read the **Workarounds** chapter for fixes. 36 | 37 | ## Introduction 38 | 39 | The following chapters provides an introduction and first steps with Balena-Engine an IoT focused Docker like container technology on a PLCnext control. 40 | 41 | For more Information about Balena-Engine visit the [website](https://www.balena.io/engine/) and the [GitHub project](https://github.com/balena-os/balena-engine). 42 | 43 | ## Install on Target 44 | 45 | For installation you need to be root user: 46 | 47 | To change to root: 48 | 49 | ```sh 50 | su 51 | ``` 52 | 53 | To set the password from root 54 | 55 | ```sh 56 | sudo passwd root 57 | ``` 58 | 59 | For installation: 60 | 61 | ```sh 62 | # Download the Project 63 | git clone https://github.com/PLCnext/Docker_GettingStarted.git 64 | 65 | # Execute Setup.sh in archive 66 | cd Docker_GettingStarted 67 | chmod +x setup.sh 68 | ./setup.sh 69 | ``` 70 | 71 | ## Workarounds 72 | 73 | ### **Fully remove images and cache before/after firmware reset** 74 | 75 | Login to the terminal, change to root and remove the folder manually 76 | 77 | ```sh 78 | rm -rf /media/rfs/rw/var/lib/balena 79 | ``` 80 | 81 | ### **Set the system time** 82 | 83 | Login to the terminal and set the system clock to the correct time. 84 | 85 | ```sh 86 | sudo date -s "YYYY-MM-DD hh:mm:ss" 87 | ``` 88 | 89 | More information on the topic system time can be found [here](https://www.plcnext.help/te/Operating_System/System_time.htm?rhhlterm=system%20time&rhsearch=system%20time) in the PLCnext Info Center. 90 | 91 | ## How to get support or provide suggestion and ideas 92 | 93 | You can get support or provide suggestion and ideas in the forum of the [PLCnext Community](https://www.plcnext-community.net). 94 | 95 | ## Work with containers 96 | 97 | All OCI compatible images can be used in combination with balena, especially docker images. 98 | For images see: https://hub.docker.com/ 99 | 100 | > Internet connection is required! 101 | 102 | ### Download an image to the controller 103 | 104 | `Pull` loads an image from a repository and stores it locally. if no complete domain is given, the images on https://hub.docker.com/ are searched automatically. 105 | 106 | ```bash 107 | root@axcf2152:~# balena-engine pull armhf/debian 108 | ``` 109 | 110 | ### Start an image on the controller 111 | 112 | `Start` creates a container from an image available on the local computer 113 | 114 | ```bash 115 | root@axcf2152:~# balena-engine start armhf/debian 116 | ``` 117 | 118 | ### Run an image 119 | 120 | The `run` command combines `pull` and `start` 121 | 122 | ```bash 123 | root@axcf2152:~# balena-engine run armhf/debian 124 | ``` 125 | 126 | ### Start an image and get access into the container 127 | 128 | The command `-it` (interactive with tty) creates a new process in a container. The entry point must also be specified. In the example `/bin/bash` 129 | 130 | ```bash 131 | root@axcf2152:~# balena-engine run -it debian /bin/bash 132 | # Result: If a container is successfully started 133 | root@9bc6dd4527e0:/# 134 | ``` 135 | 136 | ### Test the internet access inside docker container 137 | 138 | ```bash 139 | root@9bc6dd4527e0:/# ping 8.8.8.8 140 | # Result: 141 | PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 142 | 64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=14.6 ms 143 | ``` 144 | 145 | ### Exit the running container 146 | 147 | When closing and restarting containers the runtime data (data that is not part of the image) is lost. If this data is to be retained, it must be stored persistently. See volumes. 148 | 149 | ```bash 150 | root@9bc6dd4527e0:/# exit 151 | # Result: 152 | root@axcf2152:~# 153 | ``` 154 | 155 | ### Working with Volumes 156 | 157 | Mounting host volumes into the container and test it. A host volume is one way to persist data from a container. 158 | 159 | ```bash 160 | # Create a project folder on the host e.g. /opt/plcnext/test and mount it in the container as /home/test/ 161 | root@axcf2152:~# mkdir /opt/plcnext/test 162 | root@axcf2152:~# balena-engine run -it -v /opt/plcnext/test:/home/test/ debian bash 163 | ``` 164 | 165 | Alternative to host volumes, you can use container volumes on your host. 166 | There are also other methods to persistently store data from containers, for which various drivers are provided. Besides volumes and folders, central network storage, such as NFS, is often used. 167 | 168 | ```bash 169 | # For use a container volume you need a name instead of directory. Example: 170 | balena-engine run -it -v test:/home/test/ debian bash 171 | # will be create a volume. 172 | 173 | # The volumes can be viewed by: 174 | root@axcf2152:~# balena-engine volume ls 175 | 176 | # The content of the volume can be inspected via ls on the host system 177 | root@axcf2152:~# ls /media/rfs/rw/var/lib/balena/volumes/test/_data 178 | ``` 179 | 180 | ### Show all OCI container 181 | 182 | You can see an example output on the console. 183 | 184 | ```bash 185 | root@axcf2152:~# balena-engine ps -a 186 | Result: 187 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 188 | 4401cdaf0fee armhf/debian "bash" 7 minutes ago Exited (130) 8 seconds ago cranky_mayer 189 | df194ad3f89d debian "bash" 22 minutes ago Exited (0) 21 minutes ago agitated_austin 190 | 092fe03508aa nginx "nginx -g 'daemon of…" 33 minutes ago Exited (0) 31 minutes ago magical_antonelli 191 | 0dd0b4d84759 registry:2 "/entrypoint.sh /etc…" About an hour ago Up About an hour 5000/tcp, 0.0.0.0:5000->5000/tcp registry_name 192 | 2c71de9f0555 portainer/portainer "/portainer" About an hour ago Up About an hour 0.0.0.0:18000->8000/tcp, 0.0.0.0:19000->9000/tcp frosty_mclean 193 | ``` 194 | 195 | ### Remove container 196 | 197 | You can see an example output on the console. 198 | 199 | ```bash 200 | root@axcf2152:~# balena-engine rm 44 (a part of ID-Number: 4401cdaf0fee) 201 | root@axcf2152:~# balena-engine ps -a 202 | Result: 203 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 204 | df194ad3f89d debian "bash" 22 minutes ago Exited (0) 21 minutes ago agitated_austin 205 | 092fe03508aa nginx "nginx -g 'daemon of…" 33 minutes ago Exited (0) 31 minutes ago magical_antonelli 206 | 0dd0b4d84759 registry:2 "/entrypoint.sh /etc…" About an hour ago Up About an hour 5000/tcp, 0.0.0.0:5000->5000/tcp registry_name 207 | 2c71de9f0555 portainer/portainer "/portainer" About an hour ago Up About an hour 0.0.0.0:18000->8000/tcp, 0.0.0.0:19000->9000/tcp frosty_mclean 208 | ``` 209 | 210 | ## Examples 211 | 212 | Examples of interesting projects. 213 | 214 | ### Run a local registry 215 | 216 | See following Usecase: https://docs.docker.com/registry/deploying/ 217 | 218 | ```bash 219 | root@axcf2152:~# balena-engine run -d -p 5000:5000 --name registry_name registry:2 220 | ``` 221 | 222 | ### Run a local webserver nginx 223 | 224 | Find more information under: https://hub.docker.com/_/nginx 225 | 226 | ```bash 227 | root@axcf2152:~# balena-engine run -d nginx 228 | ``` 229 | 230 | ### Deploy and start Portainer (user interface for container runtimes) 231 | 232 | See Portainer Quick-Start: https://portainer.readthedocs.io/en/stable/deployment.html#quick-start 233 | Result: Open Webbrowser and login into Portainer Docker-Management-Tool (http://192.168.1.10:9000/#/home) 234 | 235 | ```bash 236 | balena-engine run -d -p 8000:8000 -p 9000:9000 -v /var/run/balena-engine.sock:/var/run/balena-engine.sock -v portainer_data_name:/data portainer/portainer 237 | ``` 238 | 239 | ## License 240 | 241 | [balenaEngine](https://github.com/balena-os/balena-engine/blob/master/README.md), [Moby and Docker](https://github.com/moby/moby/blob/master/README.md) are licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0). 242 | 243 | Copyright (c) Phoenix Contact Gmbh & Co KG. All rights reserved. 244 | 245 | Licensed under the [MIT](LICENSE) License. 246 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Vulnerablitiys 2 | 3 | Phoenix Contact provides a process to report security issues. 4 | Please visit the website for the [Phoenix Contact PSIRT](https://phoenixcontact.com/psirt) process and follow the instructions. 5 | -------------------------------------------------------------------------------- /archive/README.md: -------------------------------------------------------------------------------- 1 | # Additional Information 2 | 3 | ## Container daemon config 4 | 5 | In order for Balena to start on the PLCnext device, the configuration of Balena must be adjusted. 6 | 7 | Container daemon configuration in `/etc//daemon.json`: 8 | 9 | ```json 10 | { 11 | "data-root": "/media/rfs/rw/var/lib/balena", 12 | "storage-driver": "overlay2", 13 | "iptables": true 14 | } 15 | ``` 16 | 17 | Copyright (c) Phoenix Contact Gmbh & Co KG. All rights reserved. 18 | 19 | Licensed under the [MIT](LICENSE) License. 20 | -------------------------------------------------------------------------------- /archive/balena/etc/balena-engine/daemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "data-root": "/media/rfs/rw/var/lib/balena", 3 | "storage-driver": "overlay2", 4 | "bip": "172.18.1.1/24", 5 | "iptables": true 6 | } 7 | -------------------------------------------------------------------------------- /archive/balena/etc/ethertypes: -------------------------------------------------------------------------------- 1 | # 2 | # Ethernet frame types 3 | # This file describes some of the various Ethernet 4 | # protocol types that are used on Ethernet networks. 5 | # 6 | # This list could be found on: 7 | # http://www.iana.org/assignments/ethernet-numbers 8 | # http://www.iana.org/assignments/ieee-802-numbers 9 | # 10 | # ... #Comment 11 | # 12 | IPv4 0800 ip ip4 # Internet IP (IPv4) 13 | X25 0805 14 | ARP 0806 ether-arp # 15 | FR_ARP 0808 # Frame Relay ARP [RFC1701] 16 | BPQ 08FF # G8BPQ AX.25 Ethernet Packet 17 | DEC 6000 # DEC Assigned proto 18 | DNA_DL 6001 # DEC DNA Dump/Load 19 | DNA_RC 6002 # DEC DNA Remote Console 20 | DNA_RT 6003 # DEC DNA Routing 21 | LAT 6004 # DEC LAT 22 | DIAG 6005 # DEC Diagnostics 23 | CUST 6006 # DEC Customer use 24 | SCA 6007 # DEC Systems Comms Arch 25 | TEB 6558 # Trans Ether Bridging [RFC1701] 26 | RAW_FR 6559 # Raw Frame Relay [RFC1701] 27 | RARP 8035 # Reverse ARP [RFC903] 28 | AARP 80F3 # Appletalk AARP 29 | ATALK 809B # Appletalk 30 | 802_1Q 8100 8021q 1q 802.1q dot1q # 802.1Q Virtual LAN tagged frame 31 | IPX 8137 # Novell IPX 32 | NetBEUI 8191 # NetBEUI 33 | IPv6 86DD ip6 # IP version 6 34 | PPP 880B # PPP 35 | ATMMPOA 884C # MultiProtocol over ATM 36 | PPP_DISC 8863 # PPPoE discovery messages 37 | PPP_SES 8864 # PPPoE session messages 38 | ATMFATE 8884 # Frame-based ATM Transport over Ethernet 39 | LOOP 9000 loopback # loop proto 40 | -------------------------------------------------------------------------------- /archive/balena/etc/init.d/balena: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | ### BEGIN INIT INFO 5 | # Provides: balena 6 | # Required-Start: $syslog $remote_fs 7 | # Required-Stop: $syslog $remote_fs 8 | # Should-Start: cgroupfs-mount cgroup-lite 9 | # Should-Stop: cgroupfs-mount cgroup-lite 10 | # Default-Start: 2 3 4 5 11 | # Default-Stop: 0 1 6 12 | # Short-Description: Create lightweight, portable, self-sufficient containers. 13 | # Description: 14 | # Balena-Engine is an open-source project to easily create lightweight, portable, 15 | # self-sufficient containers from any application. The same container that a 16 | # developer builds and tests on a laptop can run at scale, in production, on 17 | # VMs, bare metal, OpenStack clusters, public clouds and more. 18 | ### END INIT INFO 19 | 20 | export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin 21 | 22 | BASE=balena 23 | 24 | # modify these in /etc/default/$BASE (/etc/default/balena) 25 | DOCKERD=/usr/bin/balena-engine-daemon 26 | # This is the pid file managed by balena itself 27 | DOCKER_PIDFILE=/var/run/$BASE.pid 28 | # This is the pid file created/managed by start-stop-daemon 29 | DOCKER_SSD_PIDFILE=/var/run/$BASE-ssd.pid 30 | DOCKER_LOGFILE=/var/log/$BASE.log 31 | DOCKER_OPTS= 32 | DOCKER_DESC="Balena" 33 | 34 | # Get lsb functions 35 | if [ -f /lib/lsb/init-functions ]; then 36 | . /lib/lsb/init-functions 37 | else 38 | if [ -f /etc/init.d/functions ]; then 39 | . /etc/init.d/functions 40 | fi 41 | 42 | # int log_begin_message (char *message) 43 | log_begin_msg () { 44 | # If no arguments were passed, return 45 | if [ -z "${1:-}" ]; then 46 | return 1 47 | fi 48 | echo -n "$@" || true 49 | } 50 | 51 | # int log_end_message (int exitstatus) 52 | log_end_msg () { 53 | # If no arguments were passed, return 54 | if [ -z "${1:-}" ]; then 55 | return 1 56 | fi 57 | 58 | local retval 59 | retval=$1 60 | 61 | if [ $1 -eq 0 ]; then 62 | echo "." || true 63 | elif [ $1 -eq 255 ]; then 64 | echo -e " (warning)." || true 65 | else 66 | echo -e " failed!" || true 67 | fi 68 | } 69 | 70 | log_success_msg () { 71 | if [ -n "${1:-}" ]; then 72 | log_begin_msg $@ 73 | fi 74 | log_end_msg 0 75 | } 76 | 77 | log_failure_msg () { 78 | if [ -n "${1:-}" ]; then 79 | log_begin_msg $@ "..." 80 | fi 81 | log_end_msg 1 || true 82 | } 83 | fi 84 | 85 | if [ -f /etc/default/$BASE ]; then 86 | . /etc/default/$BASE 87 | fi 88 | 89 | # Check balena is present 90 | if [ ! -x $DOCKERD ]; then 91 | log_failure_msg "$DOCKERD not present or not executable" 92 | exit 1 93 | fi 94 | 95 | check_init() { 96 | # see also init_is_upstart in /lib/lsb/init-functions (which isn't available in Ubuntu 12.04, or we'd use it directly) 97 | if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | grep -q upstart; then 98 | log_failure_msg "$DOCKER_DESC is managed via upstart, try using service $BASE $1" 99 | exit 1 100 | fi 101 | } 102 | 103 | fail_unless_root() { 104 | if [ "$(id -u)" != '0' ]; then 105 | log_failure_msg "$DOCKER_DESC must be run as root" 106 | exit 1 107 | fi 108 | } 109 | 110 | cgroupfs_mount() { 111 | # see also https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount 112 | if grep -v '^#' /etc/fstab | grep -q cgroup \ 113 | || [ ! -e /proc/cgroups ] \ 114 | || [ ! -d /sys/fs/cgroup ]; then 115 | return 116 | fi 117 | if ! mountpoint -q /sys/fs/cgroup; then 118 | mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup 119 | fi 120 | ( 121 | cd /sys/fs/cgroup 122 | for sys in $(awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); do 123 | mkdir -p $sys 124 | if ! mountpoint -q $sys; then 125 | if ! mount -n -t cgroup -o $sys cgroup $sys; then 126 | rmdir $sys || true 127 | fi 128 | fi 129 | done 130 | ) 131 | } 132 | 133 | case "$1" in 134 | start) 135 | check_init 136 | 137 | fail_unless_root 138 | 139 | cgroupfs_mount 140 | 141 | touch "$DOCKER_LOGFILE" 142 | chgrp balena "$DOCKER_LOGFILE" 143 | 144 | ulimit -n 1048576 145 | 146 | # Having non-zero limits causes performance problems due to accounting overhead 147 | # in the kernel. We recommend using cgroups to do container-local accounting. 148 | if [ "$BASH" ]; then 149 | ulimit -u unlimited 150 | else 151 | ulimit -p unlimited 152 | fi 153 | 154 | log_begin_msg "Starting $DOCKER_DESC: $BASE" 155 | 156 | start-stop-daemon -g balena --start --background \ 157 | --pidfile "$DOCKER_SSD_PIDFILE" \ 158 | --make-pidfile \ 159 | --startas /bin/bash \ 160 | -- \ 161 | -c "exec $DOCKERD -p $DOCKER_PIDFILE $DOCKER_OPTS >> $DOCKER_LOGFILE 2>&1" 162 | 163 | log_end_msg $? 164 | ;; 165 | 166 | stop) 167 | check_init 168 | fail_unless_root 169 | if [ -f "$DOCKER_SSD_PIDFILE" ]; then 170 | log_begin_msg "Stopping $DOCKER_DESC: $BASE" 171 | start-stop-daemon --stop --pidfile "$DOCKER_SSD_PIDFILE" --retry 10 172 | log_end_msg $? 173 | else 174 | log_warning_msg "Balena already stopped - file $DOCKER_SSD_PIDFILE not found." 175 | fi 176 | ;; 177 | 178 | *) 179 | echo "Usage: service balena {start|stop}" 180 | exit 1 181 | ;; 182 | esac 183 | -------------------------------------------------------------------------------- /archive/balena/etc/iptables/ip6tables.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PLCnext/Docker_GettingStarted/bea91e0f50d555b64911507313a44663504146b9/archive/balena/etc/iptables/ip6tables.rules -------------------------------------------------------------------------------- /archive/balena/etc/iptables/iptables.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PLCnext/Docker_GettingStarted/bea91e0f50d555b64911507313a44663504146b9/archive/balena/etc/iptables/iptables.rules -------------------------------------------------------------------------------- /archive/balena/usr/share/doc/balenaEngine/README.md: -------------------------------------------------------------------------------- 1 | balenaEngine: Moby-based container engine for IoT 2 | ================================================= 3 | 4 | balenaEngine 5 | 6 | ## Overview 7 | 8 | balenaEngine is a new container engine purpose-built for embedded and IoT use cases 9 | and compatible with Docker containers. Based on Docker’s Moby Project, balenaEngine 10 | supports container deltas for 10-70x more efficient bandwidth usage, has 3x 11 | smaller binaries, uses RAM and storage more conservatively, and focuses on 12 | atomicity and durability of container pulling. 13 | 14 | ## Features 15 | 16 | - __Small footprint__ 17 | - 3.5x smaller than Docker CE, packaged as a single binary 18 | - __Multi-arch support__ 19 | - Available for a wide variety of chipset architectures, supporting everything from tiny IoT devices to large industrial gateways 20 | - __True container deltas__ 21 | - Bandwidth-efficient updates with binary diffs, 10-70x smaller than pulling layers 22 | - __Minimal wear-and-tear__ 23 | - Extract layers as they arrive to prevent excessive writing to disk, protecting your storage from eventual corruption 24 | - __Failure-resistant pulls__ 25 | - Atomic and durable image pulls defend against partial container pulls in the event of power failure 26 | - __Conservative memory use__ 27 | - Prevents page cache thrashing during image pull, so your application runs undisturbed in low-memory situations 28 | 29 | ## Transitioning from Docker CE 30 | 31 | We left out Docker features that we saw as most needed in cloud deployments and 32 | therefore not warranting inclusion in a lightweight IoT-focused container 33 | engine. Specifically, we’ve excluded: 34 | 35 | - Docker Swarm 36 | - Cloud logging drivers 37 | - Plugin support 38 | - Overlay networking drivers 39 | - Non-boltdb discovery backends (consul, zookeeper, etcd, etc.) 40 | 41 | Unless you depend on one of the features in Docker that balenaEngine omits, using 42 | balenaEngine should be a drop-in replacement. 43 | 44 | Licensing 45 | ========= 46 | balenaEngine is licensed under the Apache License, Version 2.0. See 47 | [LICENSE](https://github.com/balena-os/balena-engine/blob/master/LICENSE) for the full 48 | license text. -------------------------------------------------------------------------------- /archive/docker/etc/docker/daemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "data-root": "/media/rfs/rw/var/lib/balena", 3 | "storage-driver": "overlay2", 4 | "bip": "172.18.2.1/24", 5 | "iptables": true 6 | } 7 | -------------------------------------------------------------------------------- /archive/docker/etc/ethertypes: -------------------------------------------------------------------------------- 1 | # 2 | # Ethernet frame types 3 | # This file describes some of the various Ethernet 4 | # protocol types that are used on Ethernet networks. 5 | # 6 | # This list could be found on: 7 | # http://www.iana.org/assignments/ethernet-numbers 8 | # http://www.iana.org/assignments/ieee-802-numbers 9 | # 10 | # ... #Comment 11 | # 12 | IPv4 0800 ip ip4 # Internet IP (IPv4) 13 | X25 0805 14 | ARP 0806 ether-arp # 15 | FR_ARP 0808 # Frame Relay ARP [RFC1701] 16 | BPQ 08FF # G8BPQ AX.25 Ethernet Packet 17 | DEC 6000 # DEC Assigned proto 18 | DNA_DL 6001 # DEC DNA Dump/Load 19 | DNA_RC 6002 # DEC DNA Remote Console 20 | DNA_RT 6003 # DEC DNA Routing 21 | LAT 6004 # DEC LAT 22 | DIAG 6005 # DEC Diagnostics 23 | CUST 6006 # DEC Customer use 24 | SCA 6007 # DEC Systems Comms Arch 25 | TEB 6558 # Trans Ether Bridging [RFC1701] 26 | RAW_FR 6559 # Raw Frame Relay [RFC1701] 27 | RARP 8035 # Reverse ARP [RFC903] 28 | AARP 80F3 # Appletalk AARP 29 | ATALK 809B # Appletalk 30 | 802_1Q 8100 8021q 1q 802.1q dot1q # 802.1Q Virtual LAN tagged frame 31 | IPX 8137 # Novell IPX 32 | NetBEUI 8191 # NetBEUI 33 | IPv6 86DD ip6 # IP version 6 34 | PPP 880B # PPP 35 | ATMMPOA 884C # MultiProtocol over ATM 36 | PPP_DISC 8863 # PPPoE discovery messages 37 | PPP_SES 8864 # PPPoE session messages 38 | ATMFATE 8884 # Frame-based ATM Transport over Ethernet 39 | LOOP 9000 loopback # loop proto 40 | -------------------------------------------------------------------------------- /archive/docker/etc/init.d/docker: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | ### BEGIN INIT INFO 5 | # Provides: Docker 6 | # Required-Start: $syslog $remote_fs 7 | # Required-Stop: $syslog $remote_fs 8 | # Should-Start: cgroupfs-mount cgroup-lite 9 | # Should-Stop: cgroupfs-mount cgroup-lite 10 | # Default-Start: 2 3 4 5 11 | # Default-Stop: 0 1 6 12 | # Short-Description: Create lightweight, portable, self-sufficient containers. 13 | # Description: 14 | # Docker is an open-source project to easily create lightweight, portable, 15 | # self-sufficient containers from any application. The same container that a 16 | # developer builds and tests on a laptop can run at scale, in production, on 17 | # VMs, bare metal, OpenStack clusters, public clouds and more. 18 | ### END INIT INFO 19 | 20 | export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin 21 | 22 | BASE=docker 23 | 24 | # modify these in /etc/default/$BASE (/etc/default/docker) 25 | DOCKERD=/usr/bin/dockerd 26 | # This is the pid file managed by docker itself 27 | DOCKER_PIDFILE=/var/run/$BASE.pid 28 | # This is the pid file created/managed by start-stop-daemon 29 | DOCKER_SSD_PIDFILE=/var/run/$BASE-ssd.pid 30 | DOCKER_LOGFILE=/var/log/$BASE.log 31 | DOCKER_OPTS= 32 | DOCKER_DESC="Docker" 33 | 34 | # Get lsb functions 35 | if [ -f /lib/lsb/init-functions ]; then 36 | . /lib/lsb/init-functions 37 | else 38 | if [ -f /etc/init.d/functions ]; then 39 | . /etc/init.d/functions 40 | fi 41 | 42 | # int log_begin_message (char *message) 43 | log_begin_msg () { 44 | # If no arguments were passed, return 45 | if [ -z "${1:-}" ]; then 46 | return 1 47 | fi 48 | echo -n "$@" || true 49 | } 50 | 51 | # int log_end_message (int exitstatus) 52 | log_end_msg () { 53 | # If no arguments were passed, return 54 | if [ -z "${1:-}" ]; then 55 | return 1 56 | fi 57 | 58 | local retval 59 | retval=$1 60 | 61 | if [ $1 -eq 0 ]; then 62 | echo "." || true 63 | elif [ $1 -eq 255 ]; then 64 | echo -e " (warning)." || true 65 | else 66 | echo -e " failed!" || true 67 | fi 68 | } 69 | 70 | log_success_msg () { 71 | if [ -n "${1:-}" ]; then 72 | log_begin_msg $@ 73 | fi 74 | log_end_msg 0 75 | } 76 | 77 | log_failure_msg () { 78 | if [ -n "${1:-}" ]; then 79 | log_begin_msg $@ "..." 80 | fi 81 | log_end_msg 1 || true 82 | } 83 | fi 84 | 85 | if [ -f /etc/default/$BASE ]; then 86 | . /etc/default/$BASE 87 | fi 88 | 89 | # Check Docker is present 90 | if [ ! -x $DOCKERD ]; then 91 | log_failure_msg "$DOCKERD not present or not executable" 92 | exit 1 93 | fi 94 | 95 | check_init() { 96 | # see also init_is_upstart in /lib/lsb/init-functions (which isn't available in Ubuntu 12.04, or we'd use it directly) 97 | if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | grep -q upstart; then 98 | log_failure_msg "$DOCKER_DESC is managed via upstart, try using service $BASE $1" 99 | exit 1 100 | fi 101 | } 102 | 103 | fail_unless_root() { 104 | if [ "$(id -u)" != '0' ]; then 105 | log_failure_msg "$DOCKER_DESC must be run as root" 106 | exit 1 107 | fi 108 | } 109 | 110 | cgroupfs_mount() { 111 | # see also https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount 112 | if grep -v '^#' /etc/fstab | grep -q cgroup \ 113 | || [ ! -e /proc/cgroups ] \ 114 | || [ ! -d /sys/fs/cgroup ]; then 115 | return 116 | fi 117 | if ! mountpoint -q /sys/fs/cgroup; then 118 | mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup 119 | fi 120 | ( 121 | cd /sys/fs/cgroup 122 | for sys in $(awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); do 123 | mkdir -p $sys 124 | if ! mountpoint -q $sys; then 125 | if ! mount -n -t cgroup -o $sys cgroup $sys; then 126 | rmdir $sys || true 127 | fi 128 | fi 129 | done 130 | ) 131 | } 132 | 133 | case "$1" in 134 | start) 135 | check_init 136 | 137 | fail_unless_root 138 | 139 | cgroupfs_mount 140 | 141 | touch "$DOCKER_LOGFILE" 142 | chgrp docker "$DOCKER_LOGFILE" 143 | 144 | ulimit -n 1048576 145 | 146 | # Having non-zero limits causes performance problems due to accounting overhead 147 | # in the kernel. We recommend using cgroups to do container-local accounting. 148 | if [ "$BASH" ]; then 149 | ulimit -u unlimited 150 | else 151 | ulimit -p unlimited 152 | fi 153 | 154 | log_begin_msg "Starting $DOCKER_DESC: $BASE" 155 | 156 | start-stop-daemon -g docker --start --background \ 157 | --pidfile "$DOCKER_SSD_PIDFILE" \ 158 | --make-pidfile \ 159 | --startas /bin/bash \ 160 | -- \ 161 | -c "exec $DOCKERD -p $DOCKER_PIDFILE $DOCKER_OPTS >> $DOCKER_LOGFILE 2>&1" 162 | 163 | log_end_msg $? 164 | ;; 165 | 166 | stop) 167 | check_init 168 | fail_unless_root 169 | if [ -f "$DOCKER_SSD_PIDFILE" ]; then 170 | log_begin_msg "Stopping $DOCKER_DESC: $BASE" 171 | start-stop-daemon --stop --pidfile "$DOCKER_SSD_PIDFILE" --retry 10 172 | log_end_msg $? 173 | else 174 | log_warning_msg "Docker already stopped - file $DOCKER_SSD_PIDFILE not found." 175 | fi 176 | ;; 177 | 178 | *) 179 | echo "Usage: service Docker {start|stop}" 180 | exit 1 181 | ;; 182 | esac 183 | -------------------------------------------------------------------------------- /archive/docker/etc/iptables/ip6tables.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PLCnext/Docker_GettingStarted/bea91e0f50d555b64911507313a44663504146b9/archive/docker/etc/iptables/ip6tables.rules -------------------------------------------------------------------------------- /archive/docker/etc/iptables/iptables.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PLCnext/Docker_GettingStarted/bea91e0f50d555b64911507313a44663504146b9/archive/docker/etc/iptables/iptables.rules -------------------------------------------------------------------------------- /archive/docker/usr/share/doc/docker-ce/README.md: -------------------------------------------------------------------------------- 1 | The Moby Project 2 | ================ 3 | 4 | ![Moby Project logo](docs/static_files/moby-project-logo.png "The Moby Project") 5 | 6 | Moby is an open-source project created by Docker to enable and accelerate software containerization. 7 | 8 | It provides a "Lego set" of toolkit components, the framework for assembling them into custom container-based systems, and a place for all container enthusiasts and professionals to experiment and exchange ideas. 9 | Components include container build tools, a container registry, orchestration tools, a runtime and more, and these can be used as building blocks in conjunction with other tools and projects. 10 | 11 | ## Principles 12 | 13 | Moby is an open project guided by strong principles, aiming to be modular, flexible and without too strong an opinion on user experience. 14 | It is open to the community to help set its direction. 15 | 16 | - Modular: the project includes lots of components that have well-defined functions and APIs that work together. 17 | - Batteries included but swappable: Moby includes enough components to build fully featured container system, but its modular architecture ensures that most of the components can be swapped by different implementations. 18 | - Usable security: Moby provides secure defaults without compromising usability. 19 | - Developer focused: The APIs are intended to be functional and useful to build powerful tools. 20 | They are not necessarily intended as end user tools but as components aimed at developers. 21 | Documentation and UX is aimed at developers not end users. 22 | 23 | ## Audience 24 | 25 | The Moby Project is intended for engineers, integrators and enthusiasts looking to modify, hack, fix, experiment, invent and build systems based on containers. 26 | It is not for people looking for a commercially supported system, but for people who want to work and learn with open source code. 27 | 28 | ## Relationship with Docker 29 | 30 | The components and tools in the Moby Project are initially the open source components that Docker and the community have built for the Docker Project. 31 | New projects can be added if they fit with the community goals. Docker is committed to using Moby as the upstream for the Docker Product. 32 | However, other projects are also encouraged to use Moby as an upstream, and to reuse the components in diverse ways, and all these uses will be treated in the same way. External maintainers and contributors are welcomed. 33 | 34 | The Moby project is not intended as a location for support or feature requests for Docker products, but as a place for contributors to work on open source code, fix bugs, and make the code more useful. 35 | The releases are supported by the maintainers, community and users, on a best efforts basis only, and are not intended for customers who want enterprise or commercial support; Docker EE is the appropriate product for these use cases. 36 | 37 | ----- 38 | 39 | Legal 40 | ===== 41 | 42 | *Brought to you courtesy of our legal counsel. For more context, 43 | please see the [NOTICE](https://github.com/moby/moby/blob/master/NOTICE) document in this repo.* 44 | 45 | Use and transfer of Moby may be subject to certain restrictions by the 46 | United States and other governments. 47 | 48 | It is your responsibility to ensure that your use and/or transfer does not 49 | violate applicable laws. 50 | 51 | For more information, please see https://www.bis.doc.gov 52 | 53 | Licensing 54 | ========= 55 | Moby is licensed under the Apache License, Version 2.0. See 56 | [LICENSE](https://github.com/moby/moby/blob/master/LICENSE) for the full 57 | license text. 58 | -------------------------------------------------------------------------------- /picture/portainer.io.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PLCnext/Docker_GettingStarted/bea91e0f50d555b64911507313a44663504146b9/picture/portainer.io.png -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | function validate_url(){ 4 | if [[ `curl --insecure -L --fail -I -s $1 2>&1 | grep 'HTTP/1.1 302 Found'` ]]; then 5 | return 0 6 | else 7 | return 1 8 | fi 9 | } 10 | 11 | # Read inut from cmd for control 12 | while true; do 13 | read -p " Please choose your container runtime: 14 | Install balenaEngine(recommend): 1 15 | Install Docker: 2 16 | Cancel installation: [C]ancel 17 | " RUNTIME 18 | case $RUNTIME in 19 | [1] ) break;; 20 | [2] ) break;; 21 | [Cc]* ) exit;; 22 | * ) echo "Please choose a valid value (1 or 2) or cancel the installation.";; 23 | esac 24 | done 25 | 26 | # Read inut from cmd for control 27 | while true; do 28 | read -p " Do you wish to install docker-compose? 29 | " COMPOSE 30 | case $COMPOSE in 31 | [Yy]* ) COMPOSE=yes; break;; 32 | [Nn]* ) COMPOSE=no; break;; 33 | [Cc]* ) exit;; 34 | * ) echo "Please answer yes/no or [c]ancel the installation.";; 35 | esac 36 | done 37 | 38 | ### Version selection removed due to incompatiblity of new versions (systemd is required) 39 | #while read -p "Version xx.xx.xx (let empty for default balenaEngine 18.9.7, Docker 19.03.12): " VERSION; do 40 | # if [ $VERSION ]; then 41 | # break; 42 | # elif [ -z $VERSION ]; then 43 | if [ $RUNTIME = "1" ]; then 44 | VERSION="18.9.7" 45 | break; 46 | else 47 | VERSION="19.03.8" 48 | break; 49 | fi 50 | # fi 51 | # done 52 | 53 | # VERSION=$(echo "$VERSION" | sed 's|+|.|g') 54 | 55 | machine=$(uname -m) 56 | 57 | case "$machine" in 58 | # "armv5"*) 59 | # arch="armv5" 60 | # ;; 61 | # "armv6"*) 62 | # arch="armv6" 63 | # ;; 64 | "armv7"*) 65 | arch="armv7" 66 | ;; 67 | # "armv8"*) 68 | # arch="aarch64" 69 | # ;; 70 | # "aarch64"*) 71 | # arch="aarch64" 72 | # ;; 73 | # "i386") 74 | # arch="i386" 75 | # ;; 76 | # "i686") 77 | # arch="i386" 78 | # ;; 79 | "x86_64") 80 | arch="x86_64" 81 | ;; 82 | *) 83 | echo "Unknown machine type: $machine" 84 | exit 1 85 | esac 86 | 87 | ### Set user rights to archive 88 | chown -R root:root ./archive 89 | chmod -R 755 ./archive 90 | 91 | case "$RUNTIME" in 92 | ### Install balenaEngine 93 | 1) 94 | echo "Starting Balena installation..." 95 | BALENA_URL="https://github.com/balena-os/balena-engine/releases/download/v${VERSION}/balena-engine-v${VERSION}-${arch}.tar.gz" 96 | ### Check for the available fitting architecture 97 | case "$arch" in 98 | "armv7") 99 | if validate_url $BALENA_URL; then 100 | # Go on when File exists! 101 | break; 102 | else 103 | echo "Balena Version is not available for $arch!" 104 | arch="armv7hf" 105 | BALENA_URL="https://github.com/balena-os/balena-engine/releases/download/v${VERSION}/balena-engine-v${VERSION}-${arch}.tar.gz" 106 | if validate_url $BALENA_URL; then 107 | # Go on when File exists! 108 | break; 109 | else 110 | echo "Balena Version is not available for $arch!" 111 | arch="armhf" 112 | BALENA_URL="https://github.com/balena-os/balena-engine/releases/download/v${VERSION}/balena-engine-v${VERSION}-${arch}.tar.gz" 113 | if validate_url $BALENA_URL; then 114 | # Go on when File exists! 115 | break; 116 | else 117 | echo "Balena Version is not available for $arch!" 118 | exit 1 119 | fi 120 | fi 121 | fi 122 | ;; 123 | "x86_64") 124 | if validate_url $BALENA_URL; then 125 | # Go on when File exists! 126 | break; 127 | else 128 | echo "Balena Version is not available for $arch!" 129 | exit 1 130 | fi 131 | ;; 132 | esac 133 | ### Download and unzip balenaEngine 134 | curl --insecure -L --fail "$BALENA_URL" -o ./balena-engine-v${VERSION}-${arch}.tar.gz 135 | tar xzv -C /usr/bin --strip-components=1 -f balena-engine-v${VERSION}-${arch}.tar.gz 136 | rm balena-engine-v${VERSION}-${arch}.tar.gz 137 | if [ -d /usr/bin/balena-engine ]; then 138 | mv /usr/bin/balena-engine /usr/bin/tmp 139 | mv /usr/bin/tmp/* /usr/bin/ 140 | rmdir /usr/bin/tmp 141 | fi 142 | #### Copy configs and add group 143 | cp -a ./archive/balena/etc/. /etc/ 144 | cp -a ./archive/balena/usr/. /usr/ 145 | groupadd balena 146 | usermod -a -G balena admin 147 | usermod -a -G balena plcnext_firmware 148 | ### Add alias for balena-engine 149 | echo "alias docker=\"/usr/bin/balena-engine\"" >> /opt/plcnext/.bashrc 150 | echo "alias balena=\"/usr/bin/balena-engine\"" >> /opt/plcnext/.bashrc 151 | update-rc.d -s balena defaults 152 | ## Install docker-compose 153 | if [ $COMPOSE = "yes" ]; then 154 | echo "Starting docker-compose installation for Balena..." 155 | COMPOSE_URL="https://github.com/docker/compose/releases/download/1.29.2/run.sh" 156 | mkdir /usr/bin 157 | if validate_url $COMPOSE_URL; then 158 | curl --insecure -L --fail $COMPOSE_URL -o /usr/bin/docker-compose 159 | sed -i 's/docker.sock/balena-engine.sock/g' /usr/bin/docker-compose 160 | sed -i 's/exec docker/exec balena-engine/g' /usr/bin/docker-compose 161 | case "$arch" in 162 | "armv7") 163 | sed -i 's/docker\/compose/apptower\/docker-compose/g' /usr/bin/docker-compose 164 | ;; 165 | "armhf") 166 | sed -i 's/docker\/compose/apptower\/docker-compose/g' /usr/bin/docker-compose 167 | ;; 168 | "armv7hf") 169 | sed -i 's/docker\/compose/apptower\/docker-compose/g' /usr/bin/docker-compose 170 | ;; 171 | esac 172 | sed -i 's/$DOCKER_HOST:$DOCKER_HOST/$DOCKER_HOST:\/var\/run\/docker.sock/g' /usr/bin/docker-compose 173 | chgrp balena /usr/bin/docker-compose 174 | chmod g+x /usr/bin/docker-compose 175 | break; 176 | else 177 | echo "Docker-Compose is not installed!" 178 | fi 179 | fi 180 | cat <