Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Th3 0racl3
tails
Commits
4e51ef9e
Commit
4e51ef9e
authored
Feb 21, 2021
by
segfault
Browse files
WIP: Introduce a LATEST file
I'm now unsure if this is a good way to go
parent
8d8f4ac5
Changes
2
Hide whitespace changes
Inline
Side-by-side
docker/debian-buster/LATEST
0 → 100644
View file @
4e51ef9e
BASE_IMAGE=debian:buster
BASE_IMAGE_DIGEST=1092695e843ad975267131f27a2b523128c4e03d2d96574bbdd7cf949ed51475
docker/debian-buster/build.sh
View file @
4e51ef9e
...
...
@@ -36,16 +36,29 @@ case "$1" in
esac
done
TAG
=
"
${
TAG
:-
"tailslive/debian-buster:v1"
}
"
# Import BASE_IMAGE and BASE_IMAGE_DIGEST
SCRIPT_DIR
=
$(
dirname
"
$(
readlink
-f
"
$0
"
)
"
)
source
"
${
SCRIPT_DIR
}
/LATEST"
# Pull the latest version of the base image
docker pull
"
${
BASE_IMAGE
}
"
#
TAG
=
"
${
TAG
:-
"tailslive/debian-buster:
${
BASE_IMAGE_DIGEST
:0:8
}
"
}
"
# Build the image
DOCKER_BUILDKIT
=
1 docker build
\
--cache-from
"
${
TAG
}
"
\
--build-arg
BUILDKIT_INLINE_CACHE
=
1
\
--build-arg
BASE_IMAGE_DIGEST
=
"
${
BASE_IMAGE_DIGEST
}
"
\
--tag
"
${
TAG
}
"
\
.
# Push the image (if requested)
if
[
-n
"
${
PUSH
:-}
"
]
;
then
docker push
"
${
TAG
}
"
# Update the BASE_IMAGE_DIGEST in the LATEST file
fi
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment