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

Merge branch 'f/speedup-docker' into 'master'

F/speedup docker

See merge request !6
parents 7d6a03f5 b7beebae
No related branches found
No related tags found
1 merge request!6F/speedup docker
Pipeline #88324 passed
...@@ -5,16 +5,30 @@ include: ...@@ -5,16 +5,30 @@ include:
.ensureDocker: &ensureDocker | .ensureDocker: &ensureDocker |
function ensureDockerfile() { function ensureDockerfile() {
if [ ! -f .dockerignore ]; then
cat > .dockerignore <<EOF
node_modules
.git
EOF
fi
if [ ! -f Dockerfile ]; then if [ ! -f Dockerfile ]; then
echo "Creating Dockerfile" echo "Creating Dockerfile"
cat > Dockerfile <<EOF cat > Dockerfile <<EOF
FROM node:12.18 FROM node:14-alpine
ADD . /app
WORKDIR /app WORKDIR /app
RUN yarn --production RUN apk add --no-cache git
EXPOSE 8080 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
EOF EOF
fi fi
......
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