diff --git a/.circleci/config.yml b/.circleci/config.yml index 53b21c98..84707969 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 new file mode 100644 index 00000000..37a3cbbc --- /dev/null +++ b/Dockerfile.arm32v7 @@ -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"]