-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
[FLINK-3155] Update docker flink container to the latest release #2340
Conversation
I also simplified some stuff from the basic script
(notice than when I said need to improve I refer at the missing automation to change the default release version on the Dockerfile). |
I added two additional changes, an extra security fix (default user is not root now) and I changed the path to the more appropriate /opt. |
tar xvz -C /usr/local/ && \ | ||
ln -s /usr/local/flink-$FLINK_VERSION /usr/local/flink && \ | ||
sed -i -e "s/echo \$mypid >> \$pid/echo \$mypid >> \$pid \&\& wait/g" /usr/local/flink/bin/flink-daemon.sh && \ | ||
curl -s https://archive.apache.org/dist/flink/flink-$FLINK_VERSION/flink-$FLINK_VERSION-bin-hadoop$HADOOP_VERSION-scala_$SCALA_VERSION.tgz | \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of the archive mirror is discouraged. It's better to use the load balancing script which you removed above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I just changed it because I find the older code so ugly (and fragile) for what it does, also my other argument to do this was the fact that people will probably won't build the image as much as they will pull it from the official hub.docker image (once we publish this image as the official one). I can let it like it was if this is better for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice that I have another argument against the mirrors and it is the security issue, imagine that a malign mirror puts a wrong version of flink, I wonder what is the recomended approach to validate this case (of course notice that I asume that hacking apache would be harder).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point concerning fragility. You're probably right. Btw, you can always validate the download using the MD5/SHA256 files from the archive server :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still would like to keep it because it is strongly encouraged to not use the load balanced servers instead of the archive server.
Thanks for the PR! It would be nice to have the install path configurable. Also, we should use ASF's load balancing script for downloading the binaries. |
We should maybe wait for 1.1.1 to be up before doing this merge, I will add the commit for this and probably rebase everything once it is ready. Is it ok ? |
@mxm this should be ready now. |
Thanks! Looks good. Did you run the changes with Docker? |
Of course, who do you think I am :P You can check a ready to run build here in case you don't want to test that one. But it is true that we need some kind of automatized tests for the image. |
And remember that my ultimate goal is not to host that image but that we can convert it into an official one. |
tar xvz -C /usr/local/ && \ | ||
ln -s /usr/local/flink-$FLINK_VERSION /usr/local/flink && \ | ||
sed -i -e "s/echo \$mypid >> \$pid/echo \$mypid >> \$pid \&\& wait/g" /usr/local/flink/bin/flink-daemon.sh && \ | ||
curl -s $(curl -s https://www.apache.org/dyn/closer.cgi\?preferred\=true)flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala_${SCALA_VERSION}.tgz | \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better! Thanks :)
Thanks for addressing my comments! Looks very good. I'm sorry I asked whether you have tested the changes. It may seem natural to you but trust me that is not always the case :) Merging... |
Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration.
If your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the How To Contribute guide.
In addition to going through the list, please provide a meaningful description of your changes.
mvn clean verify
has been executed successfully locally or a Travis build has passed