Build container images for ARM32v7 and ARM64v8

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
Simon Pasquier 2019-04-16 14:41:18 +02:00
parent edd68d7e00
commit 9f5447bf46
3 changed files with 27 additions and 12 deletions

View File

@ -85,11 +85,11 @@ jobs:
- image: circleci/golang
steps:
- checkout
- setup_remote_docker
- setup_remote_docker:
version: 18.06.0-ce
- run: docker run --privileged linuxkit/binfmt:v0.6
- attach_workspace:
at: .
- run: ln -s .build/linux-amd64/alertmanager alertmanager
- run: ln -s .build/linux-amd64/amtool amtool
- run: make docker
- run: make docker DOCKER_REPO=quay.io/prometheus
- run: docker images
@ -97,13 +97,17 @@ jobs:
- run: docker login -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io
- run: make docker-publish
- run: make docker-publish DOCKER_REPO=quay.io/prometheus
- run: make docker-manifest
- run: make docker-manifest DOCKER_REPO=quay.io/prometheus
docker_hub_release_tags:
docker:
- image: circleci/golang
steps:
- checkout
- setup_remote_docker
- setup_remote_docker:
version: 18.06.0-ce
- run: docker run --privileged linuxkit/binfmt:v0.6
- run: mkdir -v -p ${HOME}/bin
- run: curl -L 'https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2' | tar xvjf - --strip-components 3 -C ${HOME}/bin
- run: echo 'export PATH=${HOME}/bin:${PATH}' >> ${BASH_ENV}
@ -116,19 +120,23 @@ jobs:
- store_artifacts:
path: .tarballs
destination: releases
- run: ln -s .build/linux-amd64/alertmanager alertmanager
- run: ln -s .build/linux-amd64/amtool amtool
- run: make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
- run: make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG DOCKER_REPO=quay.io/prometheus
- run: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
- run: docker login -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io
- run: make docker-publish DOCKER_IMAGE_TAG="$CIRCLE_TAG"
- run: make docker-publish DOCKER_IMAGE_TAG="$CIRCLE_TAG" DOCKER_REPO=quay.io/prometheus
- run: make docker-manifest DOCKER_IMAGE_TAG="$CIRCLE_TAG"
- run: make docker-manifest DOCKER_IMAGE_TAG="$CIRCLE_TAG" DOCKER_REPO=quay.io/prometheus
- run: |
if [[ "$CIRCLE_TAG" =~ ^v[0-9]+(\.[0-9]+){2}$ ]]; then
make docker-tag-latest DOCKER_IMAGE_TAG="$CIRCLE_TAG"
make docker-tag-latest DOCKER_IMAGE_TAG="$CIRCLE_TAG" DOCKER_REPO=quay.io/prometheus
make docker-publish DOCKER_IMAGE_TAG="latest"
make docker-publish DOCKER_IMAGE_TAG="latest" DOCKER_REPO=quay.io/prometheus
make docker-manifest DOCKER_IMAGE_TAG="latest"
make docker-manifest DOCKER_IMAGE_TAG="latest" DOCKER_REPO=quay.io/prometheus
fi
- run: make docker-publish
- run: make docker-publish DOCKER_REPO=quay.io/prometheus
workflows:
version: 2

View File

@ -1,8 +1,12 @@
FROM prom/busybox:latest
ARG ARCH="amd64"
ARG OS="linux"
FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest
LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com>"
COPY amtool /bin/amtool
COPY alertmanager /bin/alertmanager
ARG ARCH="amd64"
ARG OS="linux"
COPY .build/${OS}-${ARCH}/amtool /bin/amtool
COPY .build/${OS}-${ARCH}/alertmanager /bin/alertmanager
COPY examples/ha/alertmanager.yml /etc/alertmanager/alertmanager.yml
RUN mkdir -p /alertmanager && \

View File

@ -11,6 +11,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# Needs to be defined before including Makefile.common to auto-generate targets
DOCKER_ARCHS ?= amd64 armv7 arm64
include Makefile.common
FRONTEND_DIR = $(BIN_DIR)/ui/app