-
-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create container sends env and port options incorrectly #130
Comments
Docker as a wacky format for env variables, unfortunately nothing we can do from our side. They expect an array of strings with a VARNAME=VALUE format. docker.createContainer({
Tty: true,
Image: imageName,
Env: [
'PORT=8080'
]
}, function (err, container) {
// etc.
}); |
Thanks - that worked. Might want to add that to one of your examples. |
👍 on adding this to docs :) |
How can we tag the image will commiting (dockerode) ? |
@agrawalapoorv this issue appears to be about creating containers, which are not tagged.. For tagging an image, it looks like all of the methods of creating an image accept |
Ok thanks alot... |
Trying to create a container with an exposed port and an env var -
docker.createContainer({
Image: 'hello:0.0.1',
Cmd: ['node', 'app.js'],
ExposedPorts: {'80/tcp':{}}
Env: {'PORT':8080}
}, function(err, container) { ...
when run with DEBUG=modem, I see the following on the console -
modem Sending: { path: '/containers/create?Image=e4455111414d&Cmd=node&Cmd=app.js&ExposedPorts=&Env=',
...
Note that Cmd is repeated and ExposedPorts and Env are empty. Also the Docker Remote API says that these should be sent as JSON in the body, are they being sent as query parameters?
The text was updated successfully, but these errors were encountered: