Skip to content
Snippets Groups Projects
Commit 6fa3ad33 authored by Marco Wettstein's avatar Marco Wettstein
Browse files

feat: extract node version from .nvmrc

parent 40566343
No related branches found
No related tags found
1 merge request!7feat: extract node version from .nvmrc
Pipeline #88910 passed
......@@ -12,12 +12,18 @@ include:
EOF
fi
if [ ! -f .nvmrc ]; then
NODE_VERSION=14
else
NODE_VERSION="$(cat .nvmrc| sed '/^$/d' | sed 's/[a-z-]//g')"
fi
if [ ! -f Dockerfile ]; then
echo "Creating Dockerfile"
cat > Dockerfile <<EOF
FROM node:14-alpine
FROM node:$NODE_VERSION-alpine
WORKDIR /app
RUN apk add --no-cache git
COPY --chown=node:node package.json yarn.lock ./
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment