Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Build aarch64 image
  • Loading branch information
Jimmy Lafontaine Rivera committed Jan 27, 2020
1 parent 1bb39bc commit a976e39
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 21 deletions.
6 changes: 6 additions & 0 deletions ci_scripts/get_tag.py
@@ -0,0 +1,6 @@
import yaml

with open('container-tag.yaml') as f:
data = yaml.safe_load(f)

print(data.get('tag'))
12 changes: 12 additions & 0 deletions ci_scripts/push_containers.sh
@@ -0,0 +1,12 @@
# !/bin/bash

source ci_scripts/variables.sh
ROOTDIR=`pwd`

for IMAGE_NAME in ${IMAGE_NAMES[@]}; do
cd $ROOTDIR/docker/$IMAGE_NAME
IMAGE_TAG=`python $ROOTDIR/ci_scripts/get_tag.py`
docker build -t cachengo/$IMAGE_NAME-$AARCH:$IMAGE_TAG .
#docker tag cachengo/$IMAGE_NAME:latest cachengo/$IMAGE_NAME-$AARCH:$IMAGE_TAG
docker push cachengo/$IMAGE_NAME-$AARCH:$IMAGE_TAG
done
13 changes: 13 additions & 0 deletions ci_scripts/push_manifests.sh
@@ -0,0 +1,13 @@
source ci_scripts/variables.sh

export DOCKER_CLI_EXPERIMENTAL=enabled
ROOTDIR=`pwd`

for IMAGE_NAME in ${IMAGE_NAMES[@]}; do
cd $ROOTDIR/docker/$IMAGE_NAME
IMAGE_TAG=`python $ROOTDIR/ci_scripts/get_tag.py`
docker manifest create --amend cachengo/$IMAGE_NAME:$IMAGE_TAG cachengo/$IMAGE_NAME-x86_64:$IMAGE_TAG cachengo/$IMAGE_NAME-aarch64:$IMAGE_TAG
docker manifest push --purge cachengo/$IMAGE_NAME:$IMAGE_TAG
done


2 changes: 2 additions & 0 deletions ci_scripts/variables.sh
@@ -0,0 +1,2 @@
export AARCH=`uname -m`
export IMAGE_NAMES=(bldr-alpine3 bldr-debian-python bldr-ubuntu16-c-go bldr-ubuntu18-c-go)
9 changes: 6 additions & 3 deletions docker/bldr-debian-python/Dockerfile
Expand Up @@ -30,10 +30,13 @@ RUN apt-get update && apt-get -q -y install \
libtool \
pkg-config

RUN wget -nv https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip \
&& unzip ninja-linux.zip \
RUN git clone https://github.com/ninja-build/ninja.git \
&& cd ninja \
&& git checkout v1.9.0 \
&& ./configure.py --bootstrap \
&& chmod +x ninja \
&& mv ninja /usr/local/bin
&& mv ninja /usr/local/bin \
&& cd .. && rm -rf ninja

# NNG repo is not frequently tagged so it's pinned to a commit hash.
# This commit provides fix to the proxy-reconnect
Expand Down
23 changes: 14 additions & 9 deletions docker/bldr-ubuntu16-c-go/Dockerfile
Expand Up @@ -16,7 +16,7 @@

# Builder image with superset of CI tools for RIC components

FROM nexus3.o-ran-sc.org:10001/ubuntu:16.04
FROM ubuntu:16.04

RUN apt-get update && apt-get install -y \
autoconf \
Expand Down Expand Up @@ -44,12 +44,14 @@ RUN apt-get update && apt-get install -y \

WORKDIR /tmp

RUN wget -nv https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5-Linux-x86_64.sh \
&& chmod +x cmake-3.14.5-Linux-x86_64.sh \
&& ./cmake-3.14.5-Linux-x86_64.sh --prefix=/usr/local --skip-license
RUN git clone https://github.com/Kitware/CMake.git \
&& cd CMake && git checkout v3.14.5 \
&& ./bootstrap && make && make install \
&& cd .. && rm -rf CMake

RUN wget -nv https://dl.google.com/go/go1.12.linux-amd64.tar.gz \
&& tar -xf go1.12.linux-amd64.tar.gz \
RUN if test "$(uname -m)" = "aarch64" ; then ARCH="arm64"; else ARCH="amd64"; fi \
&& wget -nv https://dl.google.com/go/go1.12.linux-$ARCH.tar.gz \
&& tar -xf go1.12.linux-$ARCH.tar.gz \
&& mv go /usr/local
ENV PATH=$PATH:/usr/local/go/bin:/usr/lib/go-1.12/bin
RUN go get -u github.com/ory/go-acc \
Expand All @@ -59,10 +61,13 @@ RUN wget -nv https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/son
&& unzip sonar-scanner-cli-3.2.0.1227-linux.zip \
&& mv sonar-scanner-3.2.0.1227-linux /usr/local/

RUN wget -nv https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip \
&& unzip ninja-linux.zip \
RUN git clone https://github.com/ninja-build/ninja.git \
&& cd ninja \
&& git checkout v1.9.0 \
&& ./configure.py --bootstrap \
&& chmod +x ninja \
&& mv ninja /usr/local/bin
&& mv ninja /usr/local/bin \
&& cd .. && rm -rf ninja

# NNG repo is not frequently tagged so it's pinned to a commit hash.
# This commit provides fix to the proxy-reconnect
Expand Down
24 changes: 15 additions & 9 deletions docker/bldr-ubuntu18-c-go/Dockerfile
Expand Up @@ -16,7 +16,7 @@

# Builder image with superset of CI tools for RIC components

FROM nexus3.o-ran-sc.org:10001/ubuntu:18.04
FROM ubuntu:18.04

RUN apt-get update && apt-get install -y \
autoconf \
Expand Down Expand Up @@ -44,13 +44,16 @@ RUN apt-get update && apt-get install -y \

WORKDIR /tmp

RUN wget -nv https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5-Linux-x86_64.sh \
&& chmod +x cmake-3.14.5-Linux-x86_64.sh \
&& ./cmake-3.14.5-Linux-x86_64.sh --prefix=/usr/local --skip-license
RUN git clone https://github.com/Kitware/CMake.git \
&& cd CMake && git checkout v3.14.5 \
&& ./bootstrap && make && make install \
&& cd .. && rm -rf CMake

RUN wget -nv https://dl.google.com/go/go1.12.linux-amd64.tar.gz \
&& tar -xf go1.12.linux-amd64.tar.gz \
RUN if test "$(uname -m)" = "aarch64" ; then ARCH="arm64"; else ARCH="amd64"; fi \
&& wget -nv https://dl.google.com/go/go1.12.linux-$ARCH.tar.gz \
&& tar -xf go1.12.linux-$ARCH.tar.gz \
&& mv go /usr/local

ENV PATH=$PATH:/usr/local/go/bin:/usr/lib/go-1.12/bin
RUN go get -u github.com/ory/go-acc \
&& mv ~/go/bin/go-acc /usr/local/go/bin
Expand All @@ -59,10 +62,13 @@ RUN wget -nv https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/son
&& unzip sonar-scanner-cli-3.2.0.1227-linux.zip \
&& mv sonar-scanner-3.2.0.1227-linux /usr/local/

RUN wget -nv https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip \
&& unzip ninja-linux.zip \
RUN git clone https://github.com/ninja-build/ninja.git \
&& cd ninja \
&& git checkout v1.9.0 \
&& ./configure.py --bootstrap \
&& chmod +x ninja \
&& mv ninja /usr/local/bin
&& mv ninja /usr/local/bin \
&& cd .. && rm -rf ninja

# NNG repo is not frequently tagged so it's pinned to a commit hash.
# This commit provides fix to the proxy-reconnect
Expand Down

0 comments on commit a976e39

Please sign in to comment.