gohttpserver/docker/push_images

18 lines
565 B
Text
Raw Permalink Normal View History

2018-09-26 07:52:24 +02:00
#!/bin/bash
#
# article: https://lantian.pub/article/modify-computer/build-arm-docker-image-on-x86-docker-hub-travis-automatic-build.lantian
set -ex
docker run --rm --privileged multiarch/qemu-user-static:register --reset
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
IMAGE_NAME="gohttpserver"
# arm linux for respberry
2018-09-26 07:57:53 +02:00
docker build -t $DOCKER_USERNAME/$IMAGE_NAME:armhf -f docker/Dockerfile.armhf .
2018-09-26 07:52:24 +02:00
# x86 linux
2018-09-26 10:24:50 +02:00
docker build -t $DOCKER_USERNAME/$IMAGE_NAME:latest -f docker/Dockerfile .
2018-09-26 07:57:53 +02:00
2018-09-26 10:40:05 +02:00
docker push $DOCKER_USERNAME/$IMAGE_NAME