-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate-dockerfiles.sh
More file actions
executable file
·34 lines (25 loc) · 782 Bytes
/
generate-dockerfiles.sh
File metadata and controls
executable file
·34 lines (25 loc) · 782 Bytes
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
#!/bin/bash
set -euo pipefail
docker pull bfren/alpine
BASE_VERSION="6.1.5"
echo "Base: ${BASE_VERSION}"
NODE_VERSIONS="16 17 18 19 20 21 22 23 24"
for V in ${NODE_VERSIONS} ; do
echo "Node.js ${V}"
ALPINE_MINOR=`cat ./${V}/ALPINE_MINOR`
NODE_PKG=`cat ./${V}/overlay/tmp/NODE_PKG`
URL="https://pkgs.alpinelinux.org/packages?name=${NODE_PKG}&branch=v${ALPINE_MINOR}&repo=&arch=&maintainer="
DOCKERFILE=$(docker run \
-v ${PWD}:/ws \
-e BF_DEBUG=0 \
bfren/alpine esh \
"/ws/Dockerfile.esh" \
BASE_VERSION=${BASE_VERSION} \
ALPINE_EDITION=${ALPINE_MINOR} \
NODE_MAJOR=${V}
)
echo "${DOCKERFILE}" > ./${V}/Dockerfile
echo "${URL}" > ./${V}/PKG.url
done
docker system prune -f
echo "Done."