From 5df1f2f23b560cbed65667036209ef8f3524b1b8 Mon Sep 17 00:00:00 2001 From: Clement FERRERE Date: Mon, 14 Mar 2022 09:41:16 +0100 Subject: [PATCH] Docker fonctionnel --- Dockerfile | 25 +++++++++++++++++++------ karma.conf.js | 2 -- package.json | 4 ---- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5222aff..004490c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,22 @@ -#stage 1 -FROM node:latest as node +# Stage 1 + + +FROM node:16-alpine3.14 as build-step + +RUN mkdir -p /app + WORKDIR /app -COPY . . + +COPY package.json /app + RUN npm install + +COPY . /app + RUN npm run build --prod -#stage 2 -FROM nginx:alpine -COPY --from=node /app/dist/demo-app /usr/share/nginx/html + +# Stage 2 + +FROM nginx:1.17.1-alpine + +COPY --from=build-step /app/dist/Collaborateur-Epa-Front /usr/share/nginx/html diff --git a/karma.conf.js b/karma.conf.js index c02789d..4a5b2ff 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -6,9 +6,7 @@ module.exports = function (config) { basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ - require('karma-jasmine'), require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), require('karma-coverage'), require('@angular-devkit/build-angular/plugins/karma') ], diff --git a/package.json b/package.json index 31a9338..88eace0 100644 --- a/package.json +++ b/package.json @@ -30,14 +30,10 @@ "@angular-devkit/build-angular": "~12.0.0", "@angular/cli": "~12.0.0", "@angular/compiler-cli": "~12.0.0", - "@types/jasmine": "~3.6.0", "@types/node": "^12.11.1", - "jasmine-core": "~3.7.0", "karma": "~6.3.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.0.3", - "karma-jasmine": "~4.0.0", - "karma-jasmine-html-reporter": "^1.5.0", "typescript": "~4.2.3" } }