From 528178341f6cdc8980eb35099554fb7f573bd60d Mon Sep 17 00:00:00 2001 From: chenzitai Date: Fri, 3 Jul 2020 00:40:50 +0100 Subject: [PATCH 1/5] ubuntu20.04 arm64 dockerfile --- docker/Dockerfile_ubuntu_20.04_arm64 | 93 ++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docker/Dockerfile_ubuntu_20.04_arm64 diff --git a/docker/Dockerfile_ubuntu_20.04_arm64 b/docker/Dockerfile_ubuntu_20.04_arm64 new file mode 100644 index 0000000..6aacd4b --- /dev/null +++ b/docker/Dockerfile_ubuntu_20.04_arm64 @@ -0,0 +1,93 @@ +FROM ubuntu:focal as builder + +# Install required packages +RUN apt-get update -q \ + && DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \ + build-essential \ + autoconf \ + automake \ + autopoint \ + zlib1g-dev \ + byacc \ + cmake \ + git \ + gcc \ + g++ \ + libssl-dev \ + libyaml-dev \ + libffi-dev \ + libreadline-dev \ + libgdbm-dev \ + libncurses5-dev \ + make \ + bzip2 \ + curl \ + ca-certificates \ + locales \ + openssh-server \ + libexpat1-dev \ + gettext \ + libz-dev \ + fakeroot \ + python3-dev \ + python3-setuptools \ + python3-pip \ + ccache \ + distcc \ + unzip \ + tzdata \ + apt-transport-https \ + gnupg + +RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen +RUN locale-gen en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 + +RUN pip3 install awscli + +ENV GO_VERSION 1.13.9 +RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-arm64.tar.gz" \ + | tar -xzC /usr/local \ + && ln -sf /usr/local/go/bin/go /usr/local/go/bin/gofmt /usr/local/go/bin/godoc /usr/local/bin/ + +ENV RUBY_VERSION 2.6.5 +RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.6/ruby-${RUBY_VERSION}.tar.gz" \ + | tar -xzC /tmp \ + && cd /tmp/ruby-${RUBY_VERSION} \ + && ./configure --disable-install-rdoc --disable-install-doc --disable-install-capi\ + && make \ + && make install + +ENV RUBYGEMS_VERSION 2.6.13 +RUN /usr/local/bin/gem update --system ${RUBYGEMS_VERSION} --no-document + +ENV BUNDLER_VERSION 1.17.3 +RUN /usr/local/bin/gem install bundler --version ${BUNDLER_VERSION} --no-document + +ENV LICENSE_FINDER_VERSION 6.5.0 +RUN /usr/local/bin/gem install license_finder --version ${LICENSE_FINDER_VERSION} --no-document + +ENV NODE_VERSION 12.4.0 +RUN curl -fsSL "https://nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-arm64.tar.gz" \ + | tar --strip-components 1 -xzC /usr/local/ \ + && node --version + +ENV YARN_VERSION 1.16.0 +RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ + echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ + apt update && apt install yarn=${YARN_VERSION}-1 -y &&\ + yarn --version + + +RUN mkdir -p /opt/gitlab /var/cache/omnibus ~/.ssh + +RUN git config --global user.email "packages@gitlab.com" +RUN git config --global user.name "GitLab Inc." + +RUN rm -rf /tmp/* + +FROM ubuntu:focal +MAINTAINER GitLab Inc. +COPY --from=builder / / -- GitLab From 41989681fd92043df2934bf26a4ac47db7c053e7 Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Thu, 20 Aug 2020 15:57:58 -0700 Subject: [PATCH 2/5] Bring in master version changes to the Dockerfile --- docker/Dockerfile_ubuntu_20.04_arm64 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile_ubuntu_20.04_arm64 b/docker/Dockerfile_ubuntu_20.04_arm64 index 6aacd4b..5410b7d 100644 --- a/docker/Dockerfile_ubuntu_20.04_arm64 +++ b/docker/Dockerfile_ubuntu_20.04_arm64 @@ -9,7 +9,6 @@ RUN apt-get update -q \ autopoint \ zlib1g-dev \ byacc \ - cmake \ git \ gcc \ g++ \ @@ -45,9 +44,14 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 +ENV CMAKE_VERSION 3.18.1 +RUN curl -L https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh -o /tmp/cmake-installer.sh \ + && chmod +x /tmp/cmake-installer.sh \ + && /tmp/cmake-installer.sh --prefix=/usr --exclude-subdir --skip-license + RUN pip3 install awscli -ENV GO_VERSION 1.13.9 +ENV GO_VERSION 1.14.7 RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-arm64.tar.gz" \ | tar -xzC /usr/local \ && ln -sf /usr/local/go/bin/go /usr/local/go/bin/gofmt /usr/local/go/bin/godoc /usr/local/bin/ -- GitLab From 9807e7f3bb99646e9a3ab642dfe63c2a426756ef Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Thu, 20 Aug 2020 15:58:21 -0700 Subject: [PATCH 3/5] Add the ubuntu arm build to CI --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1ef1e15..46834a0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -154,6 +154,9 @@ rpi_10_cmake test: stage: test-stg2 tags: [ arm ] +ubuntu_20.04_arm64 test: + extends: .test_build + tags: [ arm64 ] centos_6 test: extends: .test_build stage: test-stg3 @@ -193,6 +196,9 @@ debian_packer: *build_and_deploy ruby_docker: *build_and_deploy gitlab_provisioner: *build_and_deploy +ubuntu_20.04_arm64: + extends: .build_and_deploy + tags: [ arm64 ] centos_6: extends: .build_and_deploy stage: build-stg3 -- GitLab From 49dda3c37c846ce6af8ed0ab3c35437bee88ba0d Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Fri, 21 Aug 2020 10:46:46 -0700 Subject: [PATCH 4/5] arm64 compile cmake --- docker/Dockerfile_ubuntu_20.04_arm64 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile_ubuntu_20.04_arm64 b/docker/Dockerfile_ubuntu_20.04_arm64 index 5410b7d..f6dc7d4 100644 --- a/docker/Dockerfile_ubuntu_20.04_arm64 +++ b/docker/Dockerfile_ubuntu_20.04_arm64 @@ -12,6 +12,7 @@ RUN apt-get update -q \ git \ gcc \ g++ \ + cmake \ libssl-dev \ libyaml-dev \ libffi-dev \ @@ -44,10 +45,15 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 +# Because CMake doesn't provide binaries for ARM, we have to build using +# the existing CMake. ENV CMAKE_VERSION 3.18.1 -RUN curl -L https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh -o /tmp/cmake-installer.sh \ - && chmod +x /tmp/cmake-installer.sh \ - && /tmp/cmake-installer.sh --prefix=/usr --exclude-subdir --skip-license +RUN curl -fsSL https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}.tar.gz | tar -xzC /tmp \ + && cd /tmp/cmake-${CMAKE_VERSION} \ + && cmake . \ + && make \ + && make install \ + && apt-get purge cmake RUN pip3 install awscli -- GitLab From b19a8fa93e56c73e94ca29a4c7af2951eb13f9a3 Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Fri, 21 Aug 2020 11:05:43 -0700 Subject: [PATCH 5/5] Fix up apt remove --- docker/Dockerfile_ubuntu_20.04_arm64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile_ubuntu_20.04_arm64 b/docker/Dockerfile_ubuntu_20.04_arm64 index f6dc7d4..2348f65 100644 --- a/docker/Dockerfile_ubuntu_20.04_arm64 +++ b/docker/Dockerfile_ubuntu_20.04_arm64 @@ -53,7 +53,7 @@ RUN curl -fsSL https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSI && cmake . \ && make \ && make install \ - && apt-get purge cmake + && apt-get purge -y cmake RUN pip3 install awscli -- GitLab