Skip to content

Commit

Permalink
Shrink docker image from 530MB -> 250MB (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmlearney-digicatapult authored Nov 15, 2024
1 parent 51b8808 commit d84c8fb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1.11
FROM node:current-alpine AS builder
FROM node:lts-alpine AS builder

WORKDIR /veritable-ui

Expand Down Expand Up @@ -32,20 +32,18 @@ ENV NODE_ENV=${NODE_ENV}

RUN npx playwright install --with-deps


CMD ["npm", "run", "test:playwright"]


# service
FROM node:current-alpine AS service
# Service
FROM node:lts-alpine AS service

WORKDIR /veritable-ui

RUN apk add --update coreutils curl
RUN apk add --no-cache coreutils curl
RUN npm -g install [email protected]

COPY package*.json ./
RUN npm ci --omit-dev
RUN npm ci --omit=dev

COPY public ./public
COPY knexfile.js ./
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "veritable-ui",
"version": "0.14.16",
"version": "0.14.17",
"description": "UI for Veritable",
"main": "src/index.ts",
"type": "module",
Expand Down

0 comments on commit d84c8fb

Please sign in to comment.