You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/02/04 19:03:26 UTC

[GitHub] [ozone-docker-runner] adoroszlai commented on a change in pull request #10: HDDS-6264. Bump centos to 8.4.2105 and some dependencies in ozone-runner

adoroszlai commented on a change in pull request #10:
URL: https://github.com/apache/ozone-docker-runner/pull/10#discussion_r799737790



##########
File path: Dockerfile
##########
@@ -14,34 +14,42 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM golang:1.17.3-buster
+FROM golang:1.17.6-buster
 RUN GO111MODULE=off go get -u github.com/rexray/gocsi/csc
 
-FROM centos:7.6.1810
+FROM centos:8.4.2105
+RUN sed -i -e 's/^mirrorlist/#&/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo
 RUN yum -y install \
-        bzip2-devel \
-        gcc gcc-c++ gcc48-c++ \
-        git \
-        lz4-devel \
-        make \
-        snappy-devel \
-        which \
-        zlib-devel
-RUN git clone https://github.com/gflags/gflags.git \
-      && cd gflags \
-      && git checkout v2.0 \
-      && ./configure && make && make install
-RUN curl -LSs -o zstd-1.1.3.tar.gz https://github.com/facebook/zstd/archive/v1.1.3.tar.gz \
-      && tar zxvf zstd-1.1.3.tar.gz \
-      && cd zstd-1.1.3 \
-      && make && make install
-RUN curl -LSs -o rocksdb-6.8.1.tar.gz https://github.com/facebook/rocksdb/archive/v6.8.1.tar.gz \
-      && tar xzvf rocksdb-6.8.1.tar.gz \
-      && cd rocksdb-6.8.1 \
-      && make ldb
-
-FROM centos@sha256:b5e66c4651870a1ad435cd75922fe2cb943c9e973a9673822d1414824a1d0475
-RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
+      gcc gcc-c++ \
+      git \
+      make \
+      which \
+      cmake
+RUN curl -LSs -o gflags-src.tar.gz https://github.com/gflags/gflags/archive/v2.2.2.tar.gz \
+      && tar zxvf gflags-src.tar.gz \
+      && cd gflags-2.2.2 \
+      && mkdir build \
+      && cd build \
+      && cmake .. \
+      && make -j$(nproc) \
+      && make install \
+      && cd ../.. \
+      && rm -rf gflags-2.2.2
+RUN curl -LSs -o zstd-src.tar.gz https://github.com/facebook/zstd/archive/v1.5.2.tar.gz \
+      && tar zxvf zstd-src.tar.gz \
+      && cd zstd-1.5.2 \
+      && make -j$(nproc) \
+      && make install \
+      && cd .. \
+      && rm -rf zstd-1.5.2
+RUN curl -LSs -o rocksdb-src.tar.gz https://github.com/facebook/rocksdb/archive/v6.28.2.tar.gz \
+      && tar xzvf rocksdb-src.tar.gz \
+      && cd rocksdb-6.28.2 \
+      && make -j$(nproc) ldb
+
+FROM centos:8.4.2105

Review comment:
       Yes, it is still needed.  This starts a new, clean image.  This way we can build `ldb` but avoid including all its dependencies and tools for C++ compilation from the final `ozone-runner` image.
   
   > `FROM` can appear multiple times within a single Dockerfile to create multiple images or use one build stage as a dependency for another. ... Each `FROM` instruction clears any state created by previous instructions. ([doc](https://docs.docker.com/engine/reference/builder/#from))




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org