From 93dc3532cdcb12ac3c72ea29a243724553915b03 Mon Sep 17 00:00:00 2001 From: jotamontecino <“jota.montecino@gmail.com”> Date: Mon, 24 Oct 2022 16:30:26 +0200 Subject: [PATCH] FIX: fix injection folder --- build.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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"