Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile: Fix build step #74

Merged
merged 1 commit into from
Jul 23, 2021
Merged

Dockerfile: Fix build step #74

merged 1 commit into from
Jul 23, 2021

Conversation

gmacario
Copy link
Collaborator

Fix #73

Replace 'npm run build' with 'rpm run build:server'

Commit e0aba58 introduced a regression
by replacing npm script "build" with "build:server".

This is quick fix to make top level Dockerfile build again.

Signed-off-by: Gianpaolo Macario [email protected]

Fix #73

Replace 'npm run build' with 'rpm run build:server'

Commit e0aba58 introduced a regression
by replacing npm script "build" with "build:server".

This is quick fix to make top level Dockerfile build again.

Signed-off-by: Gianpaolo Macario <[email protected]>
@gmacario gmacario force-pushed the fix/dockerfile-run-build branch from c9b6997 to e59c8da Compare July 22, 2021 01:35
@gmacario
Copy link
Collaborator Author

Locally testing to make sure that #73 is fixed

gmacario@gmpowerhorse:~/github/gmacario/blobfishes (fix/dockerfile-run-build)$ git describe --tag
v0.0.1-9-ge59c8da
gmacario@gmpowerhorse:~/github/gmacario/blobfishes (fix/dockerfile-run-build)$ docker-compose build --pull --no-cache
Building static-pages
Step 1/7 : FROM node:14.17.3-alpine
14.17.3-alpine: Pulling from library/node
Digest: sha256:fb6cb918cc72869bd625940f42a7d8ae035c4e786d08187b94e8b91c6a534dfd
Status: Image is up to date for node:14.17.3-alpine
 ---> f5f48375fc5d
Step 2/7 : WORKDIR /usr/src/app
 ---> Running in cf1b471ade18
Removing intermediate container cf1b471ade18
 ---> 7c1b3f8a52d7
Step 3/7 : COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
 ---> a25f77dc07bc
Step 4/7 : RUN npm install --silent
 ---> Running in 57653bf05371
[svelte-preprocess] Don't forget to install the preprocessors packages that will be used: node-sass/sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc...
added 309 packages from 264 contributors and audited 311 packages in 29.253s

44 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Removing intermediate container 57653bf05371
 ---> 9b94d9fce254
Step 5/7 : COPY . .
 ---> 15dc78e28ef0
Step 6/7 : RUN npm run build
 ---> Running in cff1489b9f1f

> [email protected] build /usr/src/app
> svelte-kit build

vite v2.4.3 building for production...
transforming...

warn - You have enabled the JIT engine which is currently in preview.
warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
✓ 232 modules transformed.
rendering chunks...
.svelte-kit/output/client/_app/manifest.json                               2.04kb
.svelte-kit/output/client/_app/error.svelte-8217d14d.js                    1.56kb / brotli: 0.64kb
.svelte-kit/output/client/_app/pages/index.svelte-4b729883.js              0.62kb / brotli: 0.33kb
.svelte-kit/output/client/_app/pages/__layout.svelte-5b6f3481.js           2.80kb / brotli: 1.11kb
.svelte-kit/output/client/_app/pages/about.svelte-072ee726.js              0.57kb / brotli: 0.32kb
.svelte-kit/output/client/_app/pages/books.svelte-cec27fd9.js              6.45kb / brotli: 1.93kb
.svelte-kit/output/client/_app/assets/vendor-d6f4930c.css                  0.09kb / brotli: 0.05kb
.svelte-kit/output/client/_app/assets/start-0826e215.css                   0.18kb / brotli: 0.11kb
.svelte-kit/output/client/_app/pages/authors.svelte-3a618354.js            9.82kb / brotli: 2.79kb
.svelte-kit/output/client/_app/start-d5549f3e.js                           18.11kb / brotli: 5.67kb
.svelte-kit/output/client/_app/assets/pages/__layout.svelte-7aac1e1e.css   9.01kb / brotli: 2.23kb
.svelte-kit/output/client/_app/chunks/vendor-dd3172a6.js                   81.65kb / brotli: 17.82kb
vite v2.4.3 building SSR bundle for production...
transforming...
✓ 182 modules transformed.
rendering chunks...
.svelte-kit/output/server/app.js   87.48kb

Run npm run preview to preview your production build locally.

> Using @sveltejs/adapter-static
  ✔ done
Removing intermediate container cff1489b9f1f
 ---> 595e1a905785
Step 7/7 : CMD ["ls", "-laR", "build/"]
 ---> Running in 684aa367a0d4
Removing intermediate container 684aa367a0d4
 ---> cb40bd8aa6cc
Successfully built cb40bd8aa6cc
Successfully tagged blobfishes_static-pages:latest
Building server
Step 1/7 : FROM node:14.17.3-alpine
14.17.3-alpine: Pulling from library/node
Digest: sha256:fb6cb918cc72869bd625940f42a7d8ae035c4e786d08187b94e8b91c6a534dfd
Status: Image is up to date for node:14.17.3-alpine
 ---> f5f48375fc5d
Step 2/7 : WORKDIR /usr/src/app
 ---> Running in fa34e03f92be
Removing intermediate container fa34e03f92be
 ---> d4882e1db6a2
Step 3/7 : COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
 ---> 90cf4a763686
Step 4/7 : RUN npm install --silent
 ---> Running in 4a7c748a1dec
[bcrypt] Success: "/usr/src/app/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" is installed via remote
Love nodemon? You can now support the project via the open collective:
 > https://opencollective.com/nodemon/donate

added 602 packages from 606 contributors and audited 612 packages in 14.92s

30 packages are looking for funding
  run `npm fund` for details

found 3 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
Removing intermediate container 4a7c748a1dec
 ---> 82931e9a7df1
Step 5/7 : COPY . .
 ---> a9af06230a08
Step 6/7 : RUN npm run build:server
 ---> Running in 20185fab64f5

> [email protected] build:server /usr/src/app
> rm -rf ./dist/ && tsc

Removing intermediate container 20185fab64f5
 ---> 2e790445cbec
Step 7/7 : CMD ["node", "dist/app.js"]
 ---> Running in 4e8ae7840225
Removing intermediate container 4e8ae7840225
 ---> ae406e1de223
Successfully built ae406e1de223
Successfully tagged blobfishes_server:latest
gmacario@gmpowerhorse:~/github/gmacario/blobfishes (fix/dockerfile-run-build)$

LGTM, merging PR

@gmacario gmacario merged commit 2a53f8d into main Jul 23, 2021
@gmacario gmacario deleted the fix/dockerfile-run-build branch July 23, 2021 04:28
@gmacario gmacario changed the title Dockefile: Fix build step Dockerfile: Fix build step Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERROR: Service 'server' failed to build: The command '/bin/sh -c npm run build' returned a non-zero code: 1
1 participant