Skip to content
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

[Docker] Generated port is incorrrect #978

Open
yeikel opened this issue Jan 4, 2019 · 4 comments
Open

[Docker] Generated port is incorrrect #978

yeikel opened this issue Jan 4, 2019 · 4 comments

Comments

@yeikel
Copy link

yeikel commented Jan 4, 2019

According to the generated build

The commands to launch are the following :

docker pull andypetrella/spark-notebook:0.7.0-scala-2.11.8-spark-2.1.1-hadoop-2.7.2-with-hive
docker run -p 9001:9001 andypetrella/spark-notebook:0.7.0-scala-2.11.8-spark-2.1.1-hadoop-2.7.2-with-hive

Using that image (and I think it is the default) the port that it binds to is 9000 instead of 9001

image

docker-compose file that works :

version: "3"
services:
    spark-notebook:
        ports:
            - '9000:9000'
        image: 'andypetrella/spark-notebook:0.8.3-scala-2.11.8-spark-2.2.2-hadoop-2.6.0-with-hive'

If we use the recommended ports (9001) it won't work

@pblh123
Copy link

pblh123 commented Sep 11, 2019

Do we need to add other ports?

@vidma
Copy link
Contributor

vidma commented Sep 11, 2019

0.7.0 is a very old release. did you try with master?

if it doesn't maybe docker build needs to be updated to run spark-notebook with the port set to 9001 (so docker issues CMD <path-to-spark-notebook-exeuctable> ... -Dhttp.port=9001 , maybe in this file https://github.com/spark-notebook/spark-notebook/blob/f0551adfcf435d410f094bb5915fa155070ea0a9/project/DockerProperties.scala ; and see

spark-notebook/build.sbt

Lines 34 to 44 in f0551ad

dockerBaseImage := DockerProperties.baseImage
dockerCommands ++= DockerProperties.commands
dockerExposedVolumes ++= DockerProperties.volumes
dockerExposedPorts ++= DockerProperties.ports
dockerRepository := DockerProperties.registry //Docker
packageName in Docker := MainProperties.name
).

feel free to make a PR @pblh123 @yeikel

I guess this mismatch might have been introduced by this commit 647674d

@vidma
Copy link
Contributor

vidma commented Sep 11, 2019

or as simplest quickfix we may simply expose 9000 port too and we're done (in add 9000 in DockerProperties.ports ), but that might conflict with play default port...

@pblh123
Copy link

pblh123 commented Sep 12, 2019

@vidma Thanks u very much, i just want to run a spark-notebook and learning spark. But i didn't know which commond to run a containner is better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants