-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuilddocker.sh
More file actions
executable file
·47 lines (38 loc) · 1.14 KB
/
builddocker.sh
File metadata and controls
executable file
·47 lines (38 loc) · 1.14 KB
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
#!/bin/bash
set -ex
# SET THE FOLLOWING VARIABLES
# docker hub username
USERNAME=fredericklab
# image name
IMAGE=picachooser
# ensure we're up to date
git pull
# bump version
version=`cat VERSION | sed 's/+/ /g' | awk '{print $1}'`
echo "version: $version"
# run build
docker buildx build . \
--platform linux/arm64 \
--tag $USERNAME/$IMAGE:latest \
--build-arg VERSION=$version \
--build-arg BUILD_DATE=`date +"%Y%m%dT%H%M%S"` \
--build-arg VCS_REF=`git rev-parse HEAD`
# -t $IMAGE \
# --tag $USERNAME/$IMAGE:$version \
#docker buildx build . \
# --platform linux/amd64 \
# --tag $USERNAME/$IMAGE:latest \
# --build-arg VERSION=$version \
# --build-arg BUILD_DATE=`date +"%Y%m%dT%H%M%S"` \
# --build-arg VCS_REF=`git rev-parse HEAD`
#docker build . \
# --tag $USERNAME/$IMAGE:latest \
# --build-arg VERSION=$version \
# --build-arg BUILD_DATE=`date +"%Y%m%dT%H%M%S"` \
# --build-arg VCS_REF=`git rev-parse HEAD`
# tag it
#docker tag $IMAGE:latest $USERNAME/$IMAGE:latest
#docker tag $IMAGE:latest $USERNAME/$IMAGE:$version
# push it
#docker push $USERNAME/$IMAGE:latest
#docker push $USERNAME/$IMAGE:$version