FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
11-22-2023 12:32 AM
I have been testing building a Docker snap for my ctrlX Core X7 to run in the Container Engine. I have been able to build the Docker image and build the corresponding snap to load it on the Core. When I install it, it shows up in the Container Engine app. However, when I try to run the app, I get an error that the initialization script got a 'Permission Denied' error.
When I download the image.tar.gz file and extract the corresponding docker-entrypoint.sh file and go to the offending line in the script, I see that it is trying to use the echo command to write a value to a file/create a file in the docker volume.
info "Adding ${key}=${val} to $(basename "${init_file}")"
echo "${key}=${val}" >> "${init_file}"
Why am I getting this error? I appear to have supplied read/write access in my docker-compose.yml file so i'm not sure what I could be missing here.
Solved! Go to Solution.
11-22-2023 09:13 AM - edited 11-22-2023 09:14 AM
Hello,
Can i see your snapcraft.yaml? 😃
11-22-2023 01:43 PM
Sure, @MauroRiboniMX . Here it is, thank you for your help!
11-27-2023 04:59 AM
Some further ideas...I investigated this on Github and stumbled across this note about issues with bind mount vs. named volumes causing permission issues.
https://github.com/thirdgen88/ignition-docker/issues/1
Is there a way to use named volumes using the Container Engine, and what would be the structure? My attempts to modify the docker-compose.yml to use named volumes result in a snap that isn't recognized by the Container Engine.
11-27-2023 10:57 AM
I contact you on DM 🙂
11-29-2023 03:44 PM
I was able to figure out the solution for the permission denied issue. The modification was in the docker-compose.yml and using named volumes instead of bind mounting. Here is the final file I am using to run my Ignition docker file.
services:
ignition:
image: ${IMAGE_NAME}:${IMAGE_TAG}
container_name: ignition
ports:
- 9088:8088
- 9043:8043
volumes:
- ignition_data:/usr/local/bin/ignition/data:rw
command:
-n ctrlx-ignition
-a localhost
-h 9088
-s 9043
environment:
- ACCEPT_IGNITION_EULA=Y
- GATEWAY_ADMIN_USERNAME=admin
- GATEWAY_ADMIN_PASSWORD=password
- IGNITION_EDITION=standard
restart: on-failure
volumes:
ignition_data:
driver: local
driver_opts:
type: none
o: bind
device: ${SNAP_DATA}/docker-volumes/ctrlx-docker-ignition