From 91aa322c880f03100cc772c32ffb9bdf1fe47a37 Mon Sep 17 00:00:00 2001 From: Vern Burton Date: Wed, 1 Apr 2020 19:25:33 -0500 Subject: [PATCH] updating dockerfile and creating task to build the image from the host --- Dockerfile | 18 +----------------- package.json | 1 + 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index cab9ede03f..e20a74723a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,6 @@ -FROM node:12 as builder -WORKDIR /app - -COPY package.json yarn.lock .yarnrc .npmrc /app/ -COPY .yarn /app/.yarn -COPY packages /app/packages -COPY plugins /app/plugins - -RUN yarn - -COPY lerna.json tsconfig.json .eslintignore .eslintrc.js /app/ -COPY scripts/ /app/scripts - -RUN yarn build - FROM nginx:mainline -COPY --from=builder /app/packages/app/build /usr/share/nginx/html - +COPY packages/app/build /usr/share/nginx/html COPY docker/default.conf.template /etc/nginx/conf.d/default.conf.template COPY docker/run.sh /usr/local/bin/run.sh CMD run.sh diff --git a/package.json b/package.json index 8a862e04b5..e2a70c7d1a 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "bundle": "yarn build && yarn workspace example-app bundle", "build": "lerna run build", "test": "cross-env CI=true lerna run test --since origin/master -- --coverage", + "docker-build": "yarn build && docker build . -t spotify/backstage", "create-plugin": "backstage-cli create-plugin", "release": "if [ \"$(git symbolic-ref --short HEAD)\" = master ]; then echo \"don't try to release master\"; exit 1; else lerna version --no-push; fi", "lint": "cross-env CI=true lerna run lint --since origin/master --",