I'm trying to convert this program:
DownloadJetAdvice Edge
Full installation guide for can be seen here
From an installation to a linux machine, into a Docker container.
I need multiple running instances of this, and i've been using Docker alot in my sparetime, and it's finally time to use in my work aswell!
I've got the dockerfile complete (i think) when i build it, it downloads, and installs what it needs to, and the build completes without issues.
However, I can't get the JetAdvice program / services to run!
I've read, that if i want multiple things to run in a container, i should use supervisor, and since the JetEdge program has 3 running services, i'm using that.
This is my dockerfile:
FROM ubuntu
MAINTAINER me
EXPOSE 33322
COPY startup.sh /opt/scripts/startup.sh
RUN apt-get update &&
apt-get install -y apt-utils wget libunwind8 icu-devtools supervisor
RUN mkdir -p -- /var/log/supervisor /opt/print/download /opt/print/edgeinstaller /opt/scripts
RUN wget https://app.jetadvice.com/install/edge/jetadvice-edge-linux-x64.tar -P /opt/print/download &&
tar -xvf /opt/print/download/jetadvice-edge-linux-x64.tar -C /opt/print/edgeinstaller
RUN chmod +x /opt/print/edgeinstaller/Installer &&
/opt/print/edgeinstaller/Installer install
RUN chmod +x /usr/bin/JetAdvice/Edge/Edge &&
chmod +x /usr/bin/JetAdvice/Updater/Updater &&
chmod +x /usr/bin/JetAdvice/EdgeUI/EdgeUi &&
chmod +x /opt/scripts/startup.sh
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
CMD ["/opt/scripts/startup.sh"]
This is my supervisord.conf
[supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
[program:JetAdvice-Edge]
command=/usr/bin/JetAdvice/Edge/Edge
[program:JetAdvice-Updater]
command=/usr/bin/JetAdvice/Updater/Updater
[program:JetAdvice-Edge-UI]
command=/usr/bin/JetAdvice/EdgeUI/EdgeUi
And the startup.sh script:
#!/bin/sh
#somethingvariblehere
/usr/bin/supervisord
I've tried to run the JetAdvice a bunch of ways, but i can't get the program to run.
For info, this is one of the JedAdvice-Edge.service files:
Description=JetAdvice Edge connector service
Wants=network.target
After=syslog.target network-online.target
[Service]
Type = simple
ExecStart=/usr/bin/JetAdvice/Edge/Edge
Restart=on-failure
RestartSec=10
KillMode=process
[Install]
WantedBy=multi-user.target
If i log into my docker container and try to run the service, i get this erroor
root@6727e8f42044:/# service JetAdvice-Updater start
JetAdvice-Updater: unrecognized service
If i try to run the program directly i get:
root@6727e8f42044:/# /usr/bin/JetAdvice/Edge/Edge
bash: /usr/bin/JetAdvice/Edge/Edge: Permission denied
root@6727e8f42044:/# ./usr/bin/JetAdvice/Edge/Edge
bash: ./usr/bin/JetAdvice/Edge/Edge: Permission denied
I tried doing chmod +x on /usr/bin/JetAdvice/Edge/Edge and then it seems like the program is running for 3 seconds, then nothing happens.
root@6727e8f42044:/# chmod +x /usr/bin/JetAdvice/Edge/Edge
root@6727e8f42044:/# /usr/bin/JetAdvice/Edge/Edge
root@6727e8f42044:/#
I'm not even close to a linux expert, but i can't imagine that what i'm trying to do, can't be done.
So what am i doing wrong, what's the next step?
Working install.json file from the JetEdge team
{
"InstallConfig": {
"ApiClient": {
"SignIn": {
"InstallKey": "prettykeyhere",
"DcaInstanceID": "prettyidhere"
},
"HttpLogging": {
"MaxSize": 10240,
"LogHttp": false
},
"Proxy": {
"Address": "",
"Port": 8080,
"AutoDetect": true
}
},
"ApiEndpoint": {
"LoginBaseAddress": "https://auth.eu.edge-api.com",
"BaseAddress": "https://dr.eu.edge-api.com",
"ConfigBaseAddress": "https://config.eu.edge-api.com",
"StayAliveBaseAddress": "https://p.eu.edge-api.com",
"UpdateBaseAddress": "https://upd.eu.edge-api.com",
"UiApiBaseAddress": "https://ui.eu.edge-api.com",
"RangesBaseAddress": "https://ranges.eu.edge-api.com",
"LoggerBaseAddress": "https://log.eu.edge-api.com",
"StatusBaseAddress": "https://status.eu.edge-api.com"
},
"Installs": [
{
"Product": 1,
"Folder": "C:\Program Files (x86)\JetAdvice\Updater",
"ServiceName": "JetAdvice-Updater",
"ServiceExe": "Updater.dll",
"Version": "0.4.18.0",
"BuildRID": "win-x86",
"Oem": 0
},
{
"Product": 10,
"Folder": "C:\Program Files (x86)\JetAdvice\Edge",
"ServiceName": "JetAdvice-Edge",
"ServiceExe": "Edge.dll",
"Version": "0.4.24.0",
"BuildRID": "win-x86",
"Oem": 0
},
{
"Product": 20,
"Folder": "C:\Program Files (x86)\JetAdvice\EdgeUI",
"ServiceName": "JetAdvice-Edge-UI",
"ServiceExe": "EdgeUi.dll",
"Version": "0.4.1.0",
"BuildRID": "win-x86",
"Oem": 0
}
]
}
}
And the key i generated for testing is:
4809b732-eb36-413f-8993-bd8d1f2e2942
EDIT, i've updated the dockerfile, and added the startup.sh script to the OP.
question from:
https://stackoverflow.com/questions/65830110/converting-a-program-into-a-docker-container