From 062044e9b0ad94afaf0238bc97788690fbbd81a7 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 13 Apr 2021 16:04:14 +0200 Subject: [PATCH] MOBILE-3496 Docker: Add docker files in ionic 5 branch --- .dockerignore | 2 ++ Dockerfile | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..210c47a90 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules +Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..4f7efd3ed --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +# This image is based on the fat node 14 image. +# We require fat images as neither alpine, or slim, include git binaries. +FROM node:14 + +# Port 8100 for ionic dev server. +EXPOSE 8100 + +# Port 35729 is the live-reload server. +EXPOSE 35729 + +# Port 53703 is the Chrome dev logger port. +EXPOSE 53703 + +WORKDIR /app + +COPY . /app + +# Install npm libraries. +RUN npm install && rm -rf /root/.npm + +# Run gulp before starting. +RUN npx gulp + +# Provide a Healthcheck command for easier use in CI. +HEALTHCHECK --interval=10s --timeout=3s --start-period=30s CMD curl -f http://localhost:8100 || exit 1 + +CMD ["npm", "run", "ionic:serve"]