Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions 0.12/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM ubuntu:18.04
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a large image to start from. Why not use buildpack-deps:bionic-scm ?

Copy link
Copy Markdown
Contributor Author

@yuokada yuokada Jan 23, 2019

Choose a reason for hiding this comment

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

A image using buildpack-deps is bigger than using ubuntu.

$ sudo docker images
REPOSITORY                 TAG                 IMAGE ID            CREATED             SIZE
tmp2                       latest              d1cc5d0e893c        10 seconds ago      317 MB  # <= FROM buildpack-deps
tmp                        latest              2ca50fa19b8a        5 minutes ago       151.9 MB   #  <= FROM ubuntu:18.04
docker.io/ubuntu           18.04               20bb25d32758        6 hours ago         87.47 MB
docker.io/buildpack-deps   bionic-scm          4b15e4cfafaf        3 weeks ago         247.9 MB

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see - my mistake.


ENV THRIFT_VERSION v0.12.0

RUN buildDeps=" \
automake \
bison \
curl \
flex \
g++ \
libboost-dev \
libboost-filesystem-dev \
libboost-program-options-dev \
libboost-system-dev \
libboost-test-dev \
libevent-dev \
libssl-dev \
libtool \
make \
pkg-config \
"; \
apt-get update && apt-get install -y --no-install-recommends $buildDeps && rm -rf /var/lib/apt/lists/* \
&& curl -k -sSL "https://github.com/apache/thrift/archive/${THRIFT_VERSION}.tar.gz" -o thrift.tar.gz \
&& mkdir -p /usr/src/thrift \
&& tar zxf thrift.tar.gz -C /usr/src/thrift --strip-components=1 \
&& rm thrift.tar.gz \
&& cd /usr/src/thrift \
&& ./bootstrap.sh \
&& ./configure --disable-libs \
&& make \
&& make install \
&& cd / \
&& rm -rf /usr/src/thrift \
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -rf /var/cache/apt/* \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* \
&& rm -rf /var/tmp/*


CMD [ "thrift" ]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It would be better if this container did not run thrift as root.

There's a good recipe for running inside a container as a regular user in the Boost Docker Development Environment.