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

Dockerfile for building protoc on Centos 6.6 #371

Merged
merged 1 commit into from May 12, 2015

Conversation

zhangkun83
Copy link
Contributor

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

@zhangkun83 zhangkun83 changed the title Dockerfile for building on Centos 6.6 Dockerfile for building protoc on Centos 6.6 May 12, 2015
# 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
Copy link
Contributor

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).

Copy link
Contributor

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 ; )

Copy link
Contributor Author

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"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Contributor Author

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

@ejona86
Copy link
Contributor

ejona86 commented May 12, 2015

@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")

@liujisi
Copy link
Contributor

liujisi commented May 12, 2015

LGTM

liujisi added a commit that referenced this pull request May 12, 2015
Dockerfile for building protoc on Centos 6.6
@liujisi liujisi merged commit 23bb79d into protocolbuffers:master May 12, 2015
@zhangkun83
Copy link
Contributor Author

Will resolve #354 for the next release.

@zhangkun83 zhangkun83 deleted the docker branch May 13, 2015 00:33
taoso pushed a commit to taoso/protobuf that referenced this pull request Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants