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
Dockerfile for building protoc on Centos 6.6 #371
Conversation
# Install Java 8 | ||
RUN wget -q --no-cookies --no-check-certificate \ | ||
--header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz" \ | ||
-O jdk-8u45-linux-x64.tar.gz |
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 a big deal, but if you extract in the same line the download won't need to be stored in the docker image.
See https://github.com/grpc/grpc/blob/master/tools/dockerfile/grpc_java_base/Dockerfile#L46 . Note that if you "wget; tar ; rm file" it also wouldn't be saved in the image (if it is created and removed in the same RUN command).
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.
And really, it would be "wget && tar && rm file" (&& instead of ; )
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.
Done using the pipe.
|
||
RUN git clone https://github.com/google/protobuf.git | ||
|
||
CMD ["scl", "enable", "devtoolset-1.1", "bash"] |
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 this do?
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 starts bash in the devtoolset environment in which we can use GCC 4.7
@zhangkun83 LGTM. I had comments, but I don't think they matter too much (as this doesn't need to be perfect, just "good enough") |
LGTM |
Dockerfile for building protoc on Centos 6.6
Will resolve #354 for the next release. |
Golden was not updated after golang/protobuf@47eb67e ref protocolbuffers#329
Centos 6.6 uses GLIBC_2.12, which is older than Debian Wheezy (GLIBC_2.13) and Ubuntu 14.04 (GLIBC_2.19). Older glibc dependency is preferable because glibc has backward compatibility.
@ejona86 @pherl please take a look