diff --git a/build.sh b/build.sh index 01818e7..837d796 100755 --- a/build.sh +++ b/build.sh @@ -7,7 +7,7 @@ tag="${CI_COMMIT_REF_SLUG:-latest}" echo "" echo "Building $image:$tag" -node_container=$(buildah from docker.io/node:16.17.1-alpine3.15) +node_container=$(buildah from docker.io/trashnochados/nodejs:raw-node16) ## General configuration buildah config \ @@ -21,12 +21,15 @@ function brun() { } podman run --rm -it -v "$PWD":/usr/src/app/ trashnochados/nodejs:raw-node16 yarn install ## Set alpine as starting point -buildah add $node_container ./bin /usr/lts/bin -buildah add $node_container ./lib /usr/lts/lib -buildah add $node_container ./server.js /usr/lts/server.js -buildah add $node_container ./package.json /usr/lts/package.json -buildah add $node_container ./node_modules /usr/lts/node_modules -brun npm i -g /usr/lts/ ## Set the link so the the nodejs module can be used as a cli directly +buildah add $node_container ./bin /usr/src/app/bin +buildah add $node_container ./lib /usr/src/app/lib +buildah add $node_container ./server.js /usr/src/app/server.js +buildah add $node_container ./package.json /usr/src/app/package.json +buildah add $node_container ./node_modules /usr/src/app/node_modules +buildah add $node_container ./.env /usr/src/app/.env +echo "Installing the LTS cli as global" +brun npm i -g /usr/src/app/ ## Set the link so the the nodejs module can be used as a cli directly ## Creating image buildah commit --rm $node_container "$image:$tag" +echo "Created image: $image:$tag"