FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We are updating our platform to a new
system.
Read more: Important
information on the platform change.
10-12-2023 07:16 AM - last edited on 10-13-2023 08:07 AM by CodeShepherd
Hi @Sgilk ,
I am new to Docker,
I am trying to follow the video example, but i had trouble snapping the app.
I am using ctrlX works App Build Environments and vscode to established a SSH connection.
I run below command:
1) Git clone https://github.com/S-Gilk/ctrlx-docker-mosquitto-interface
2) sudo apt install docker
Now i will need to configure buildx
How to configure buildx?
When i tried to run build task, it is not recognised in the build task terminal.
warmest regards,
Solved! Go to Solution.
10-12-2023 09:26 AM
Hello,
You have to install docker as a snap. i try to give you some examples.
10-12-2023 05:56 PM - edited 10-12-2023 06:08 PM
First install Docker.
(snap install docker)
Then, follow the Docker BuildX install instructions here and you should be able to run the build. Make sure you pass your architecture to the build command. ie. (./scripts/build_all.sh "arm64")
10-13-2023 03:59 AM - edited 10-13-2023 04:51 AM
I managed to snap the file, however when i installed the snap file into the ctrlX, there are some errors with the ui and interface.
I have Px.exe running on my PC background.
When i install the snap file into the ctrlX, the container engine does not show the MQTT broker
When i run the command below:
boschrexroth@app-builder-amd64:~/ctrlx-docker-mosquitto-interface$ sudo ./scripts/build_all.sh "arm64"
--- clean up Docker
Error response from daemon: No such container: ui
Error response from daemon: No such container: interface
Total reclaimed space: 0B
Error response from daemon: No such image: interface:latest
Error response from daemon: No such image: ui:latest
"docker rmi" requires at least 1 argument.
See 'docker rmi --help'.
Usage: docker rmi [OPTIONS] IMAGE [IMAGE...]
Remove one or more images
TARGET_ARCH: arm64
--- build mosquitto
TARGET_ARCH: arm64
--- create ../docker-compose/docker-compose.env
removed '../docker-compose/docker-compose.env'
--- create docker image with platform arm64
Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 127.0.0.53:53: no such host
Error response from daemon: reference does not exist
Error: No such image: eclipse-mosquitto:latest
--- build datalayer interface
TARGET_ARCH: arm64
--- add image env variables
--- create ctrlx-datalayer-mqtt-interface docker image with platform arm64
[+] Building 0.2s (4/4) FINISHED
=> [internal] load build definition from Dockerfile_interface 0.1s
=> => transferring dockerfile: 851B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> ERROR [internal] load metadata for docker.io/library/ubuntu:20.04 0.0s
=> CANCELED [context project] load .dockerignore 0.1s
=> => transferring project: 0.1s
------
> [internal] load metadata for docker.io/library/ubuntu:20.04:
------
Dockerfile_interface:2
--------------------
1 | # Specify the parent image from which we build
2 | >>> FROM ubuntu:20.04
3 |
4 | # Set the working directory
--------------------
ERROR: failed to solve: ubuntu:20.04: failed to do request: Head "https://registry-1.docker.io/v2/library/ubuntu/manifests/20.04": dial tcp: lookup registry-1.docker.io on 127.0.0.53:53: no such host
Error response from daemon: reference does not exist
Error: No such image: ctrlx-datalayer-mqtt-interface:latest
--- build datalayer interface ui
TARGET_ARCH: arm64
--- add image env variables
--- create ctrlx-datalayer-mqtt-ui docker image with platform arm64
[+] Building 0.2s (4/4) FINISHED
=> [internal] load build definition from Dockerfile_ui 0.0s
=> => transferring dockerfile: 599B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> ERROR [internal] load metadata for docker.io/library/python:3.12-rc-slim-buster 0.0s
=> CANCELED [context project] load .dockerignore 0.1s
=> => transferring project: 0.1s
------
> [internal] load metadata for docker.io/library/python:3.12-rc-slim-buster:
------
Dockerfile_ui:2
--------------------
1 | # Specify the parent image from which we build
2 | >>> FROM python:3.12-rc-slim-buster
3 |
4 | # Set the working directory
--------------------
ERROR: failed to solve: python:3.12-rc-slim-buster: failed to do request: Head "https://registry-1.docker.io/v2/library/python/manifests/3.12-rc-slim-buster": dial tcp: lookup registry-1.docker.io on 127.0.0.53:53: no such host
Error response from daemon: reference does not exist
Error: No such image: ctrlx-datalayer-mqtt-ui:latest
--- build snap
TARGET_ARCH: arm64
--- clean snap
Running with 'sudo' may cause permission errors and is discouraged. Use 'sudo' when cleaning.
--- build snap with architecture arm64
Running with 'sudo' may cause permission errors and is discouraged. Use 'sudo' when cleaning.
*EXPERIMENTAL* --target-arch for core20 enabled.
Setting target machine to 'arm64'
Pulling docker-compose
+ snapcraftctl pull
Building docker-compose
+ snapcraftctl build
+ cp --archive --link --no-dereference . /home/boschrexroth/ctrlx-docker-mosquitto-interface/parts/docker-compose/install
Staging docker-compose
+ snapcraftctl stage
Priming docker-compose
+ snapcraftctl prime
Snapping |
Snapped ctrlx-docker-mosquitto-interface_1.1_arm64.snap
--- clean snap
Running with 'sudo' may cause permission errors and is discouraged. Use 'sudo' when cleaning.
Cleaning up priming area
Cleaning up staging area
Cleaning up parts directory
Did i missed out anything?
10-13-2023 08:09 AM
Moved to corresponding sub forum SDK from this topic.
10-13-2023 02:24 PM
10-13-2023 03:05 PM
There are a number of errors here that indicate an internet connection problem. You are failing to pull the parent images when building from Dockerfile. I don't know your exact networking details, but make sure you have internet access and your proxy is configured correctly. If you can't (wget google.com), you won't be able to build.
10-18-2023 05:37 AM
After i installed BuildX, i tried running the command below:
It is not able to find the image.
Did i missed out something?
10-23-2023 03:11 PM
Again, this looks like an internet connection issue. There are many possibilities of what could be causing the problem, so I can't provide a specific fix in this case. I'd suggest trying this on a personal PC and home network if you are currently on a company PC and VPN.
Can you (wget google.com) from a bash terminal in your development environment?
Are you on a VPN or using a proxy?
11-03-2023 03:48 AM - edited 11-03-2023 03:49 AM
Thank you @MauroRiboniMX for helping!
I did not run docker as normal user
enter the command line below line by line: Source
sudo addgroup --system docker
sudo adduser $USER docker
newgrp docker
sudo snap disable docker
sudo snap enable docker
Also before executing ./build_all.sh enter this command line "sudo chmod 777 -R *” to enable every user has the rights to not only access this folder, but also read, write and execute it's files.