Synapse : construire image sans buildkit #15
This commit is contained in:
parent
974d1da71f
commit
d10cb82e24
|
@ -12,16 +12,7 @@ buildfolder=/tmp/synapse-$$
|
||||||
if ! podman image exists ${synapse_image}:${synapse_version}; then
|
if ! podman image exists ${synapse_image}:${synapse_version}; then
|
||||||
mkdir ${buildfolder} &&
|
mkdir ${buildfolder} &&
|
||||||
curl -sSfL -- "https://github.com/matrix-org/synapse/archive/refs/tags/${synapse_version}.tar.gz" | \tar xz --strip-components 1 -C ${buildfolder}/ && {
|
curl -sSfL -- "https://github.com/matrix-org/synapse/archive/refs/tags/${synapse_version}.tar.gz" | \tar xz --strip-components 1 -C ${buildfolder}/ && {
|
||||||
podman image pull docker.io/moby/buildkit:latest
|
podman build -t ${synapse_image}:${synapse_version} -f ${buildfolder}/docker/Dockerfile ${buildfolder}/
|
||||||
podman container run -d --name buildkitd --privileged docker.io/moby/buildkit:latest &&
|
|
||||||
my_buildctl --addr=podman-container://buildkitd build \
|
|
||||||
--frontend dockerfile.v0 \
|
|
||||||
--local context=${buildfolder}/ \
|
|
||||||
--local dockerfile=${buildfolder}/docker/ \
|
|
||||||
--output type=oci,name="${synapse_image}:${synapse_version}" | \
|
|
||||||
podman image load &&
|
|
||||||
podman container rm --force buildkitd &&
|
|
||||||
podman image rm docker.io/moby/buildkit:latest
|
|
||||||
}
|
}
|
||||||
rm -rf ${buildfolder}
|
rm -rf ${buildfolder}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue