diff --git a/test/docker/Dockerfile.ubt.24.04 b/test/docker/Dockerfile.ubt.24.04 new file mode 100644 index 00000000..5da85012 --- /dev/null +++ b/test/docker/Dockerfile.ubt.24.04 @@ -0,0 +1,20 @@ +# Ubuntu 24.04 + HotPocket + +FROM ubuntu:noble + +COPY libblake3.so /usr/local/lib/ +RUN apt-get update \ + && apt-get install --no-install-recommends -y \ + sqlite3 \ + fuse3 \ + openssl \ + ca-certificates \ + curl \ + && curl -O http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb \ + && dpkg -i libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir /usr/local/bin/hotpocket + +COPY hpcore hpfs hpws evernode-license.pdf /usr/local/bin/hotpocket/ + +ENTRYPOINT ["/usr/local/bin/hotpocket/hpcore"] diff --git a/test/docker/Dockerfile.ubt.24.04-njs b/test/docker/Dockerfile.ubt.24.04-njs new file mode 100644 index 00000000..ac8d563f --- /dev/null +++ b/test/docker/Dockerfile.ubt.24.04-njs @@ -0,0 +1,6 @@ +# HotPocket (Ubuntu 24.04) + NodeJs + +FROM evernode/hotpocket:%ver%-ubt.24.04 + +# Copy the node binary from build context to the container image. +COPY node /usr/bin/ \ No newline at end of file diff --git a/test/docker/build-24.sh b/test/docker/build-24.sh new file mode 100755 index 00000000..a33d0f49 --- /dev/null +++ b/test/docker/build-24.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Builds all the HotPocket docker images. + +hpcoredir=$(realpath ../..) +img=evernode/hotpocket +basefile="Dockerfile.ubt.24.04" +njsfile="Dockerfile.ubt.24.04-njs" + +# Prepare build context +tmp=$(mktemp -d) +cp $hpcoredir/build/hpcore $hpcoredir/test/bin/{hpfs,hpws,libblake3.so} $hpcoredir/evernode-license.pdf $tmp/ +strip $tmp/hpcore + +# Remove the revision component from hp version to make up the image version. +hpversion=$($tmp/hpcore version | head -n 1) +# imgversion=$(echo "${hpversion% }") +imgversion=$(echo "${hpversion% }") + +# Ubuntu base image +docker build -t "$img:$imgversion-ubt.24.04" -t "$img:latest-ubt.24.04" -f ./$basefile $tmp/ +rm -r $tmp/* + +# NodeJs image +# Download and place the nodejs binary in the build context. +curl -fsSL -o $tmp/nodejs.tar.xz https://nodejs.org/dist/v20.4.0/node-v20.4.0-linux-x64.tar.xz +tar -xvJf $tmp/nodejs.tar.xz --strip-components=2 -C $tmp/ node-v20.4.0-linux-x64/bin/node +rm $tmp/nodejs.tar.xz +cp ./$njsfile $tmp/ +sed -i "s/%ver%/$imgversion/g" $tmp/$njsfile +docker build -t "$img:$imgversion-ubt.24.04-njs.20" -t "$img:latest-ubt.24.04-njs.20" -f $tmp/$njsfile $tmp + +rm -r $tmp \ No newline at end of file