🐳 Fixes Docker images for ARM-based devices

This commit is contained in:
Alicia Sykes 2021-08-06 20:47:37 +01:00
parent 0e23fdc16c
commit 9e3d728768
2 changed files with 9 additions and 13 deletions

View File

@ -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

View File

@ -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