mirror of
https://github.com/hamburghammer/gohttpserver.git
synced 2024-12-22 06:47:39 +01:00
18 lines
No EOL
565 B
Bash
18 lines
No EOL
565 B
Bash
#!/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
|
|
docker build -t $DOCKER_USERNAME/$IMAGE_NAME:armhf -f docker/Dockerfile.armhf .
|
|
|
|
# x86 linux
|
|
docker build -t $DOCKER_USERNAME/$IMAGE_NAME:latest -f docker/Dockerfile .
|
|
|
|
docker push $DOCKER_USERNAME/$IMAGE_NAME |