-
Notifications
You must be signed in to change notification settings - Fork 26
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
Is specifying a Docker network supported? #198
Comments
@danw-mpl - Would you specify that in your docker-compose? There is not currently an explicit way to specify it in the Commandeer UI, but I am happy to add that. How exactly would it work? |
Hello, thanks for replying. Straight forward enough. Using the standard Docker Compose way of creating named networks. Example: services:
localstack:
{...}
networks:
- localstack
{...}
networks:
localstack:
driver: bridge
name: localstack In terms of getting the network(s) the container is attached to, there are a couple ways: Possibly an option although the network 'ID' is present in the array and the user won't know what it is without using the Docker CLI. $>docker inspect -f '{{range.NetworkSettings.Networks}}{{.Aliases}}{{end}}' localstack_main
[0172d5097474 localstack] An option to get the first network in the array $>docker inspect localstack_main | jq -r '.[].NetworkSettings.Networks | keys | first'
localstack Alternatively you could just run $>docker inspect localstack_main
{
"Id": "0172d509747472fa0239dca1bed9a1d88cc2378bfbc15f53089d78e31107f21c",
{...}
"NetworkSettings": {
{...}
"Networks": {
"localstack": {
{...}
"Aliases": [
"0172d5097474",
"localstack"
],
{...}
}
}
}
}
]
|
Found a workaround for my use case. To get DNS name resolution working between containers and have Localstack available from the host (for Commandeer), I added two networks to docker-compose.yml.
|
Hello,
We're using Docker Compose to launch Localstack and another container which runs a CloudFormation template against it on launch. To do this, both containers need to be on the same network to resolve the localstack hostname.
I can't find an option in Commandeer to specify the Docker network that Localstack is using. Is this available? If not, is possible to request this as a feature?
Alternatively if anyone else is running a CloudFormation template against Localstack, happy to change our approach.
The text was updated successfully, but these errors were encountered: