-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Adding script to build and publish docker image #4200
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
Conversation
Jackie-Jiang
left a comment
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.
You need to add license header for these files
| ARG PINOT_BRANCH=master | ||
| ARG PINOT_GIT_URL="https://github.com/apache/incubator-pinot.git" | ||
| RUN echo "Trying to build Pinot from [ ${PINOT_GIT_URL} ] on branch [ ${PINOT_BRANCH} ]" | ||
| ENV PINOT_HOME=/opt/pinot |
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.
Just try to understand, can we pass these through environment variables?
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.
This is image path, it could be passed from outside, but not really necessary.
docker/Dockerfile
Outdated
|
|
||
| VOLUME ["${PINOT_HOME}/configs", "${PINOT_HOME}/data"] | ||
|
|
||
| EXPOSE 9000 8099 8098 8097 8096 9514 |
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.
What does these numbers stand for? Maybe add some comments?
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.
Those are default ports for controller/broker/server/admin.
| docker inspect pinot-zookeeper|grep IPAddress | ||
| "SecondaryIPAddresses": null, | ||
| "IPAddress": "172.17.0.2", | ||
| "IPAddress": "172.17.0.2", |
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.
Duplicate line? Also, extra ,?
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.
Not really, this field appears also inside the nested field:
Below is a sample example of NetworkSettings
"NetworkSettings": {
"Bridge": "",
"SandboxID": "23406af2ceaa015751faab22e383216e173c111073510c0134aa8d8189acce47",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"2181/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "2191"
}
],
"2888/tcp": null,
"3888/tcp": null
},
"SandboxKey": "/var/run/docker/netns/23406af2ceaa",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "72e7e3628415fcf12c972ac5e8ceaa5536cfdb6d90df6f3b13f5f05bcdd36628",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.3",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:03",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "b6b2f7c3d4c82fd85370d998f0de3d6a517f0350c0495169a1d7751968ee24bb",
"EndpointID": "72e7e3628415fcf12c972ac5e8ceaa5536cfdb6d90df6f3b13f5f05bcdd36628",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.3",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:03",
"DriverOpts": null
}
}
}
|
Where do we publish the docker image? Apache Incubator had the restriction on releasing non-apache approved releases to public. The policy seems that as long as we publish the docker image created from the official apache releases (e.g. 0.1.0), it's fine. But, it's NOT ok to publish any arbitrary version that did not go through the voting process. Some guideline from the general@incubator for docker is the following. Some related discussions https://issues.apache.org/jira/browse/LEGAL-270 |
|
@snleee, thanks for the pointers. I agree that we should all published releases under https://hub.docker.com/r/apache/ must be based on the released code. But individuals are free to take this and publish it under a different repo right? I am assuming we will have an instruction page such as https://zeppelin.apache.org/docs/0.7.0/install/docker.html |
Codecov Report
@@ Coverage Diff @@
## master #4200 +/- ##
============================================
+ Coverage 65.42% 67.21% +1.79%
Complexity 20 20
============================================
Files 1052 1041 -11
Lines 54590 51518 -3072
Branches 7771 7217 -554
============================================
- Hits 35714 34628 -1086
+ Misses 16319 14521 -1798
+ Partials 2557 2369 -188
Continue to review full report at Codecov.
|
|
I think we should maintain an official Pinot dockerhub account and make docker image publish as part of the release process. This script could also be a reference for pinot users to publish their own images. |
+1 on making it part of our release process. I'll create an issue for this to be tackled in our 0.3 release. |
snleee
left a comment
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.
LGTM otherwise
| DOCKER_TAG=test | ||
| fi | ||
| echo "Trying to push docker image to ${DOCKER_TAG}" | ||
| docker push ${DOCKER_TAG} |
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.
Which repository this will push? As long as this won't push to the official apache/pinot for docker hub, I'm fine with this pr.
|
Synced with @fx19880617 offline. Running the script will be no-op (permission denied). Users will need to set their custom tag for publishing to their own repository. For the official apache release, we will need to set up |
Adding docker support to build image.