22 lines
779 B
Bash
22 lines
779 B
Bash
|
#!/bin/bash
|
||
|
echo "Welcome!"
|
||
|
|
||
|
version="1.0.5"
|
||
|
localRegistryPass="***REMOVED***"
|
||
|
#platform="linux/amd64,linux/arm64"
|
||
|
platform="linux/arm64"
|
||
|
|
||
|
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 image build --build-arg APP_VERSION=$version -t "network-resurrector-api:$version" -f "src/api/NetworkResurrector.Api/Docker/Dockerfile" .
|
||
|
docker buildx build \
|
||
|
--build-arg APP_VERSION=$version \
|
||
|
--platform $platform \
|
||
|
--output=type=image,push=true,registry.insecure=true \
|
||
|
--push \
|
||
|
--tag alpine-nexus:8500/network-resurrector/network-resurrector-api:$version \
|
||
|
-f "src/api/NetworkResurrector.Api/Docker/amd64/Dockerfile" .
|
||
|
|
||
|
echo "Done!"
|