Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9342848
build_images.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
build_images.sh
View Options
#!/usr/bin/env bash
builddate
=
$(
date
+%Y%m%d
)
buildtime
=
$(
date
+%H%M%S
)
builddatetime
=
"
${
builddate
}
-
${
buildtime
}
"
username
=
$(
docker
info
|
grep
Username
|
awk
'{print $2}'
)
for
img
in
base
web
replayer
;
do
docker
build
\
--build-arg
SWH_VER
=
${
builddatetime
}
\
--build-arg
debianversion
=
buster
\
--tag
softwareheritage/
${
img
}
:
${
builddatetime
}
\
--target
swh-
${
img
}
\
.
docker
tag
softwareheritage/
${
img
}
:
${
builddatetime
}
softwareheritage/
${
img
}
:
${
builddate
}
docker
tag
softwareheritage/
${
img
}
:
${
builddate
}
softwareheritage/
${
img
}
:latest
if
[[
-n
"
${
username
}
"
]]
&&
[[
"
${
PUBLISH
:=no
}
"
=
"yes"
]]
;
then
echo
"Publishing image softwareheritage:
${
img
}
-
${
builddate
}
on docker hub"
docker
push
softwareheritage/
${
img
}
:
${
builddatetime
}
docker
push
softwareheritage/
${
img
}
:
${
builddate
}
docker
push
softwareheritage/
${
img
}
:latest
fi
done
#docker tag softwareheritage:base-${builddate} softwareheritage:latest
echo
"Done creating images. You may want to use"
echo
"export SWH_IMAGE_TAG=
${
builddatetime
}
"
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Fri, Jul 4, 1:03 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3263723
Attached To
rCDFP Deployment tools for hosting a mirror
Event Timeline
Log In to Comment