Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Links : Correct format for defining links in a Docker run/compose #14

Open
nodecentral opened this issue Apr 16, 2021 · 0 comments
Open

Comments

@nodecentral
Copy link

nodecentral commented Apr 16, 2021

Please could you confirm how you are to apply links with the api ?

I’m trying to create a guacamole container with requires two ‘links’ - https://registry.hub.docker.com/r/guacamole/guacamole however I’m getting an error.

docker run 
    --name some-guacamole \
    --link some-guacd:guacd \
    --link some-postgres:postgres      \
    -e POSTGRES_DATABASE=guacamole_db  \
    -e POSTGRES_USER=guacamole_user    \
    -e POSTGRES_PASSWORD=some_password \
    -d -p 8080:8080 guacamole/guacamole

I tried the following..

curl -sq -XPOST -b cookies.txt -d '{ "type": "docker", "name": "guacamole-host", "image": "guacamole/guacamole", "tag": "latest", "autostart": true, "link": "guacd-host:guacd", "link": "PostgreSQL:postgres, "environment": [ "TZ=Europe/London" ], "network": { "mode": "host" }, "resource": { "limit": { "cputime": 250, "cpuweight": 250, "memory": "2048" } }, "volume": { "host": { "/share/Backups/VM/Guacamole": { "bind": "/data", "rw": true } } } }' http://127.0.0.1:8080/containerstation/api/v1/container

but it gave me the following error...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>400 Bad Request</title>
<h1>Bad Request</h1>
<p>The browser (or proxy) sent a request that this server could not understand.</p>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant