From 9e3d728768a5e5b3dc6755c125c154bef607830c Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Fri, 6 Aug 2021 20:47:37 +0100 Subject: [PATCH] :whale: Fixes Docker images for ARM-based devices --- Dockerfile-arm32v7 | 16 +++++++--------- Dockerfile-arm64v8 | 6 ++---- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Dockerfile-arm32v7 b/Dockerfile-arm32v7 index a7009c4b..437d1ebf 100644 --- a/Dockerfile-arm32v7 +++ b/Dockerfile-arm32v7 @@ -8,26 +8,24 @@ ENV IS_DOCKER true # Create and set the working directory WORKDIR ${DIRECTORY} -# Install Yarn -RUN npm install -g yarn +# Copy over both 'package.json' and 'yarn.lock' +COPY package.json ./ +COPY yarn.lock ./ -# Copy over both 'package.json' and 'package-lock.json' (if available) -COPY package*.json ./ - -# Install project dependencies +# Install dependencies RUN yarn # Copy over all project files and folders to the working directory COPY . . -# Build initial app for production +# Build Dashy for production RUN yarn build -# Expose given port +# Expose users port EXPOSE ${PORT} # Finally, run start command to serve up the built application CMD [ "yarn", "build-and-start"] -# Run simple healthchecks every 5 mins, to check the Dashy's everythings great +# Enable Docker healthcecks, to ensure Dashy is running correctly HEALTHCHECK --interval=5m --timeout=2s --start-period=30s CMD yarn health-check diff --git a/Dockerfile-arm64v8 b/Dockerfile-arm64v8 index b3ab8bb5..c5fd92f6 100644 --- a/Dockerfile-arm64v8 +++ b/Dockerfile-arm64v8 @@ -8,11 +8,9 @@ ENV IS_DOCKER true # Create and set the working directory WORKDIR ${DIRECTORY} -# Install Yarn -RUN npm install -g yarn - # Copy over both 'package.json' and 'package-lock.json' (if available) -COPY package*.json ./ +COPY package.json ./ +COPY yarn.lock ./ # Install project dependencies RUN yarn