Why doesn't port forwarding work consistently with my Docker instance?
I ssh'd into a server from my laptop. I opened up a port on my laptop to accept incoming traffic from port 9090, and forward it to 9191.
On the server, I created a Docker ball: sudo docker run --network host --runtime=nvidia -it --rm tensorflow/tensorflow:latest-gpu /bin/bash
.
Next, on the shell (in Docker), I did this: jupyter notebook --ip=0.0.0.0 --port=9090 --allow-root
Voila! I pointed my browser to http://localhost:9191, and I could see the precious 'lil notebook running.
I exited the Docker ball, quit the ssh process, went home and went to sleep.
Today, I woke up and ssh'd back to the server. I opened up that same port on my laptop as I did the day before.
I accessed a shell in yesterday's Docker image by sudo docker start my_image
and then
sudo docker exec -it my_image /bin/bash
But now, when I get on the shell (in the Docker), and type jupyter notebook --ip=0.0.0.0 --port=9090 --allow-root
, like I did yesterday, my forwarding no longer works. Why?
docker ssh portforwarding
add a comment |
I ssh'd into a server from my laptop. I opened up a port on my laptop to accept incoming traffic from port 9090, and forward it to 9191.
On the server, I created a Docker ball: sudo docker run --network host --runtime=nvidia -it --rm tensorflow/tensorflow:latest-gpu /bin/bash
.
Next, on the shell (in Docker), I did this: jupyter notebook --ip=0.0.0.0 --port=9090 --allow-root
Voila! I pointed my browser to http://localhost:9191, and I could see the precious 'lil notebook running.
I exited the Docker ball, quit the ssh process, went home and went to sleep.
Today, I woke up and ssh'd back to the server. I opened up that same port on my laptop as I did the day before.
I accessed a shell in yesterday's Docker image by sudo docker start my_image
and then
sudo docker exec -it my_image /bin/bash
But now, when I get on the shell (in the Docker), and type jupyter notebook --ip=0.0.0.0 --port=9090 --allow-root
, like I did yesterday, my forwarding no longer works. Why?
docker ssh portforwarding
add a comment |
I ssh'd into a server from my laptop. I opened up a port on my laptop to accept incoming traffic from port 9090, and forward it to 9191.
On the server, I created a Docker ball: sudo docker run --network host --runtime=nvidia -it --rm tensorflow/tensorflow:latest-gpu /bin/bash
.
Next, on the shell (in Docker), I did this: jupyter notebook --ip=0.0.0.0 --port=9090 --allow-root
Voila! I pointed my browser to http://localhost:9191, and I could see the precious 'lil notebook running.
I exited the Docker ball, quit the ssh process, went home and went to sleep.
Today, I woke up and ssh'd back to the server. I opened up that same port on my laptop as I did the day before.
I accessed a shell in yesterday's Docker image by sudo docker start my_image
and then
sudo docker exec -it my_image /bin/bash
But now, when I get on the shell (in the Docker), and type jupyter notebook --ip=0.0.0.0 --port=9090 --allow-root
, like I did yesterday, my forwarding no longer works. Why?
docker ssh portforwarding
I ssh'd into a server from my laptop. I opened up a port on my laptop to accept incoming traffic from port 9090, and forward it to 9191.
On the server, I created a Docker ball: sudo docker run --network host --runtime=nvidia -it --rm tensorflow/tensorflow:latest-gpu /bin/bash
.
Next, on the shell (in Docker), I did this: jupyter notebook --ip=0.0.0.0 --port=9090 --allow-root
Voila! I pointed my browser to http://localhost:9191, and I could see the precious 'lil notebook running.
I exited the Docker ball, quit the ssh process, went home and went to sleep.
Today, I woke up and ssh'd back to the server. I opened up that same port on my laptop as I did the day before.
I accessed a shell in yesterday's Docker image by sudo docker start my_image
and then
sudo docker exec -it my_image /bin/bash
But now, when I get on the shell (in the Docker), and type jupyter notebook --ip=0.0.0.0 --port=9090 --allow-root
, like I did yesterday, my forwarding no longer works. Why?
docker ssh portforwarding
docker ssh portforwarding
asked Nov 15 '18 at 0:40
Monica HeddneckMonica Heddneck
95911647
95911647
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
So, if anyone stumbles onto this question, to solve this I ended up starting over.
STEP 1: ssh
STEP 2: create Docker this way:
sudo docker run -p 9090:9090 --runtime=nvidia -it --rm tensorflow/tensorflow:latest-gpu /bin/bash
The key was the -p 9090:9090
part. I don't know what --network host
was or wasn't doing, but getting rid of it was the key.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53310859%2fwhy-doesnt-port-forwarding-work-consistently-with-my-docker-instance%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
So, if anyone stumbles onto this question, to solve this I ended up starting over.
STEP 1: ssh
STEP 2: create Docker this way:
sudo docker run -p 9090:9090 --runtime=nvidia -it --rm tensorflow/tensorflow:latest-gpu /bin/bash
The key was the -p 9090:9090
part. I don't know what --network host
was or wasn't doing, but getting rid of it was the key.
add a comment |
So, if anyone stumbles onto this question, to solve this I ended up starting over.
STEP 1: ssh
STEP 2: create Docker this way:
sudo docker run -p 9090:9090 --runtime=nvidia -it --rm tensorflow/tensorflow:latest-gpu /bin/bash
The key was the -p 9090:9090
part. I don't know what --network host
was or wasn't doing, but getting rid of it was the key.
add a comment |
So, if anyone stumbles onto this question, to solve this I ended up starting over.
STEP 1: ssh
STEP 2: create Docker this way:
sudo docker run -p 9090:9090 --runtime=nvidia -it --rm tensorflow/tensorflow:latest-gpu /bin/bash
The key was the -p 9090:9090
part. I don't know what --network host
was or wasn't doing, but getting rid of it was the key.
So, if anyone stumbles onto this question, to solve this I ended up starting over.
STEP 1: ssh
STEP 2: create Docker this way:
sudo docker run -p 9090:9090 --runtime=nvidia -it --rm tensorflow/tensorflow:latest-gpu /bin/bash
The key was the -p 9090:9090
part. I don't know what --network host
was or wasn't doing, but getting rid of it was the key.
answered Nov 15 '18 at 21:02
Monica HeddneckMonica Heddneck
95911647
95911647
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53310859%2fwhy-doesnt-port-forwarding-work-consistently-with-my-docker-instance%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown