multiarch

This commit is contained in:
Jeff Vandrew Jr 2019-02-19 23:15:23 -05:00
parent 77942fc8aa
commit ac99d11fd9
2 changed files with 26 additions and 5 deletions

View File

@ -9,9 +9,12 @@ jobs:
- checkout
- run:
command: |
LATEST_TAG="${CIRCLE_TAG:1}"
DOCKERHUB_DESTINATION="$DOCKERHUB_REPO:$LATEST_TAG-amd64"
DOCKERHUB_DOCKERFILE="Dockerfile"
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
sudo docker build --pull -t $DOCKERHUB_REPO:latest-amd64 -f linuxamd64.Dockerfile .
sudo docker push $DOCKERHUB_REPO:latest-amd64
sudo docker build --pull -t "$DOCKERHUB_DESTINATION" -f "$DOCKERHUB_DOCKERFILE" .
sudo docker push "$DOCKERHUB_DESTINATION"
publish_docker_linuxarm32v7:
machine:
@ -21,10 +24,12 @@ jobs:
- run:
command: |
sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset
#
LATEST_TAG="${CIRCLE_TAG:1}"
DOCKERHUB_DESTINATION="$DOCKERHUB_REPO:$LATEST_TAG-arm32v7"
DOCKERHUB_DOCKERFILE="Dockerfile.arm32v7"
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
sudo docker build --pull -t $DOCKERHUB_REPO:latest-arm32v7 -f linuxarm32v7.Dockerfile .
sudo docker push $DOCKERHUB_REPO:latest-arm32v7
sudo docker build --pull -t "$DOCKERHUB_DESTINATION" -f "$DOCKERHUB_DOCKERFILE" .
sudo docker push "$DOCKERHUB_DESTINATION"
publish_docker_multiarch:
machine:

16
Dockerfile.arm32v7 Normal file
View File

@ -0,0 +1,16 @@
FROM node:10-alpine-arm32v7
RUN apk add --no-cache tini
WORKDIR /RTL
COPY . /RTL
# Install dependencies
RUN npm install
EXPOSE 3000
ENTRYPOINT ["/sbin/tini", "-g", "--"]
CMD ["node", "rtl"]