diff --git a/Dockerfile b/Dockerfile index ca3337b141c1e..d81ffe3c01d3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,12 +5,11 @@ WORKDIR /app COPY package.json ./package.json COPY yarn.lock ./yarn.lock # copy `dist` if it exists already -COPY dis[t]/web ./dist/ -COPY node_module[s] ./node_modules +COPY dis[t]/web ./dist/web # git is needed for jinter RUN apk add git # don't rebuild if you don't have to -RUN if [ ! -d 'node_modules' ]; then yarn ci; fi +RUN if [ ! -d 'dist/web' ]; then yarn ci; fi ## Build Stage ## FROM node:18-alpine AS build diff --git a/README.md b/README.md index 685ee5b6495d6..7ab782d07154f 100644 --- a/README.md +++ b/README.md @@ -98,8 +98,9 @@ yarn pack:web ### Commands for the PWA Docker Image ```bash + # 💨 Creates and runs the image locally. Add `--platform=linux/arm64` to docker build for ARM64 devices including Apple Silicon -docker build -t freetubecordova . # Warning, might take 10 minutes. +docker build -t freetubecordova . # Warning, might take a while on Apple Silicon docker run --name ftcordova -d -p 8080:80 freetubecordova # 🏃 Runs the image from Docker Hub.