Reputation: 1471
I have a docker network that I'd like to run on AWS, preferably using the Fargate Launch type.
Pushing images to the ECR (Elastic Container Registry) is not a problem, but I am not sure how to push a network. I have the following commands to run it locally on my machine:
docker pull zilutian/hadoop
docker pull zilutian/data-analytics
docker network create hadoop-net
docker run -d --net hadoop-net --name master --hostname master zilutian/data-analytics master
docker run -d --net hadoop-net --name slave01 --hostname slave01 zilutian/hadoop slave
docker run -d --net hadoop-net --name slave02 --hostname slave02 zilutian/hadoop slave
docker exec master benchmark
I'm not sure if I need to push the network or the master and slaves?
Upvotes: 0
Views: 188
Reputation: 158917
The only thing you can push to ECR (or any other image registry) is the Docker images themselves; the contents of the zilutian/data-analytics
and zilutian/Hadoop
images you reference in the docker run
command. You can’t push a network, running containers, processes in a container, or anything else.
90% of this you can encapsulate in a Docker Compose YAML file, which is probably the easiest way to describe this set of images, run commands, and a private network. You can check this file into source control; there is no way to push it to a Docker registry. (Or alternatively you can just check in the file from the question as a shell script and run it.)
The one thing you can’t include in this is the docker exec
command. It’s unclear why you’d want to launch a benchmark out of a Hadoop master node; I would docker run
a separate container that’s the benchmarking tool, or possibly run it outside of Docker directly from the host or somewhere else you can access the cluster.
Upvotes: 1