From c9e634f1b94fc53d9a1338f0e48f24d207c6f730 Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sat, 25 Jun 2022 01:40:12 +0300 Subject: [PATCH] ARM prepare --- Dockerfile | 4 ++-- buildx.sh | 22 ++++++++++++++++++++++ package.json | 7 ++++++- 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 buildx.sh diff --git a/Dockerfile b/Dockerfile index a4dcb9a..9ff9fe8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # build environment -FROM node:12 as builder +FROM node:12-slim as builder WORKDIR /app COPY package*.json ./ @@ -10,7 +10,7 @@ COPY . ./ RUN npm run build # production environment -FROM node:12 +FROM node:12-slim ARG APP_SUBFOLDER=reverse-proxy COPY --from=builder /app/build ./application/${APP_SUBFOLDER} diff --git a/buildx.sh b/buildx.sh new file mode 100644 index 0000000..820b0a4 --- /dev/null +++ b/buildx.sh @@ -0,0 +1,22 @@ +#!/bin/bash +echo "Welcome!" + +version="1.3.2" +platform="linux/amd64,linux/arm64,linux/arm/v7" +#version="1.3.2-arm64" +#platform="linux/arm64" +localRegistryPass="***REMOVED***" + +echo "Login to alpine-nexus registry." +docker login --username=admin --password=$localRegistryPass alpine-nexus:8500 + +echo "Create docker image with version $version for platform $platform" +docker buildx build \ + --build-arg APP_VERSION=$version \ + --platform $platform \ + --output=type=image,push=true,registry.insecure=true \ + --push \ + --tag alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:$version \ + . + +echo "Done!" \ No newline at end of file diff --git a/package.json b/package.json index 46a12d2..3c22f1f 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,13 @@ { "name": "reverse-proxy-frontend", - "version": "1.2.0", + "version": "1.3.2", "private": true, "description": "Reverse proxy frontend application", + "author": { + "name": "Tudor Stanciu", + "email": "***REMOVED******REMOVED***", + "url": "https://toodle.ddns.net/tsp" + }, "scripts": { "start": "run-p start:dev", "start:dev": "webpack serve --config webpack.config.dev.js --port 3000",