-
Notifications
You must be signed in to change notification settings - Fork 31
/
docker.sh
53 lines (44 loc) · 1.43 KB
/
docker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# docker buildx create --driver=docker-container --name=container
version="0.10.17"
build="mcr.microsoft.com/dotnet/sdk:8.0"
base="mcr.microsoft.com/dotnet/runtime:8.0"
name="transformalize.cli"
# docker build -f "./src/CLI/Dockerfile" \
# --force-rm \
# -t dalenewman/$name:$version \
# -t dalenewman/$name:latest \
# --build-arg BASE_IMAGE=$base \
# --build-arg BUILD_IMAGE=$build \
# "."
# docker push dalenewman/$name:$version
# docker push dalenewman/$name:latest
docker buildx build --builder=container \
--platform=linux/amd64,linux/arm64 \
-f "./src/CLI/Dockerfile" \
--force-rm \
-t dalenewman/$name:$version \
-t dalenewman/$name:latest \
--build-arg BASE_IMAGE=$base \
--build-arg BUILD_IMAGE=$build \
--push .
build="mcr.microsoft.com/dotnet/sdk:8.0-alpine"
base="mcr.microsoft.com/dotnet/runtime:8.0-alpine"
# docker build -f "./src/CLI/Dockerfile" \
# --force-rm \
# -t dalenewman/$name:$version-alpine \
# -t dalenewman/$name:$latest-alpine
# --build-arg BASE_IMAGE=$base \
# --build-arg BUILD_IMAGE=$build \
# "."
# docker push dalenewman/$name:$version-alpine
# docker push dalenewman/$name:latest-alpine
docker buildx build --builder=container \
--platform=linux/amd64,linux/arm64 \
-f "./src/CLI/Dockerfile" \
--force-rm \
-t dalenewman/$name:$version-alpine \
-t dalenewman/$name:latest-alpine \
--build-arg BASE_IMAGE=$base \
--build-arg BUILD_IMAGE=$build \
--push .