Newer
Older
file: panter-kubernetes-base.yml
.ensureDocker: &ensureDocker |
function ensureDockerfile() {
if [ ! -f .dockerignore ]; then
cat > .dockerignore <<EOF
node_modules
.git
EOF
fi
if [ ! -f Dockerfile ]; then
echo "Creating Dockerfile"
cat > Dockerfile <<EOF

Marco Wettstein
committed
FROM node:12-alpine
RUN apk add --no-cache git
COPY --chown=node:node package.json yarn.lock ./
RUN chown -R node:node .
USER node
RUN yarn --frozen-lockfile --production=true --ignore-scripts
COPY --chown=node:node . .
RUN yarn --frozen-lockfile --production=true