Comments (7)
I've been working at this a little bit this morning and I've tried several variations.
Using this:
--entrypoint sh -c 'apk add jq; while ! [ -e /data/acme.json ] || ! [ `jq ".[] | .Certificates | length" /data/acme.json` != 0 ]; do sleep 1; done && traefik-certs-dumper file --version v2 --watch --source /data/acme.json --dest /data/certs'
Gives the following Error:
Using this:
--entrypoint "sh -c 'apk add jq; while ! [ -e /data/acme.json ] || ! [ `jq \".[] | .Certificates | length\" /data/acme.json` != 0 ]; do sleep 1; done && traefik-certs-dumper file --version v2 --watch --source /data/acme.json --dest /data/certs'"
Gives this error, which I'm inclined to believe is closer to correct but it somehow thinks the directories don't exist despite the volumes very clearly being defined in the parameters above:
At this point, I'm not sure if it's Unraid parsing it incorrectly, as I expect it to just take the field in the GUI and intsert it as is into the command. I think if I somehow get it working using command line as a docker run command I can at least rule out that the conversion from Docker Compose is correct.
from traefik-certs-dumper.
Trying to run this as a docker run:
docker run -d --name='traefik-certs-dumper' --net='bridge' -v '/mnt/user/appdata/traefik/':'/data/' --entrypoint "sh -c 'apk add jq; while ! [ -e /data/acme.json ] || ! [ `jq ".[] | .Certificates | length" /data/acme.json` != 0 ]; do sleep 1; done && traefik-certs-dumper file --version v2 --watch --source /data/acme.json --dest /data/certs' 'ldez/traefik-certs-dumper:latest'"
Comes out with this error:
jq: error: Could not open file /data/acme.json: No such file or directory
"docker run" requires at least 1 argument.
See 'docker run --help'.
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Run a command in a new container
Same error it seems - an issue accessing the file under /data/
I know this file exists at the mapped location. I'm missing something here in the syntax I believe.
from traefik-certs-dumper.
Seems I'm having some kind of permissions issue. I don't understand how, as the docker system in unraid is root, but it seems that the /data path isn't mounting.
from traefik-certs-dumper.
I'm almost certain it's a permissions issue because when I attempt to read and parse the acme.json from SSH as root, it works until I add a select statement to the jq, at which point bash throws an error stating it doesn't have access.
This aligns with the error that the attempted docker run statement is throwing. That the path or file doesn't exist, implying it cannot mount it to access it.
from traefik-certs-dumper.
I'm almost certain it's a permissions issue because when I attempt to read and parse the acme.json from SSH as root, it works until I add a select statement to the jq, at which point bash throws an error stating it doesn't have access.
Try explicitly mounting the acme.json - i remember having some issues with the traefik container when just the parent directory was mapped.
from traefik-certs-dumper.
I'm almost certain it's a permissions issue because when I attempt to read and parse the acme.json from SSH as root, it works until I add a select statement to the jq, at which point bash throws an error stating it doesn't have access.
Try explicitly mounting the acme.json - i remember having some issues with the traefik container when just the parent directory was mapped.
That's actually the first way I attempted to do it. You can see in the first screenshot of my unraid GUI attempts that I was mapping the acme.json by it's file name. Afterwards, I tried just mapping the entire folder and that didn't work either, same error.
The owner of the file is root, because traefik runs as root in the container, but what confuses me is I'm running docker as root and it still cannot access it.
from traefik-certs-dumper.
I tried adding the PGID and PUID defaults that containers use on Unraid and it didnt' solve the directory/file missing error.
So there is still an access issue here. I may dig a bit more, but I've currently got a user script set up that uses jq to extract the keys and install them correctly.
from traefik-certs-dumper.
Related Issues (20)
- filename of wildcard certificates with single quotes with docker HOT 8
- Dependabot can't parse your go.mod
- csr? HOT 1
- Nothing happens when I run this via docker-compose
- After dump of certificates is there anyway to have script change either owner (chown) and/or mode (chmod)? HOT 4
- Example fails, when you have more than one certresolver configured HOT 4
- Change clean behaviour HOT 4
- Add support for other certificate file standards HOT 10
- output folders empty
- Empty directories after running file command HOT 1
- acme.json unexpected EOF HOT 4
- Exporting sans wildcard cert into a file name, replacing star (*). HOT 3
- Docker issue with certain flags HOT 24
- Crypto Go :we are a research group to help developers build secure applications.
- make domain name as crt-name and key-name HOT 5
- Add jq during build of the docker image HOT 2
- Unknown Operand HOT 1
- Possible to export a subdomain from a wildcard domain? HOT 2
- SANS in acme.json vs SANS in dumped certificate HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traefik-certs-dumper.