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

railway up fails to build docker container #877

Closed
breadchris opened this issue Dec 13, 2022 · 3 comments · Fixed by #879
Closed

railway up fails to build docker container #877

breadchris opened this issue Dec 13, 2022 · 3 comments · Fixed by #879

Comments

@breadchris
Copy link

Describe the bug
When following the deployment instructions for railway, the docker container cannot be built because libssl is not found.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the deployment steps on https://wasp-lang.dev/docs/deploying
  2. Run the command railway up

Expected behavior
I expect that the docker container for the service should be able to be built.

Screenshots

=========================
Using Detected Dockerfile
=========================
#1 [internal] load build definition from Dockerfile
#1 sha256:948cc1b4a200879284e9530ff6982d899c74e817a9a7c88b8f6036b8de8f6713
 
#1 transferring dockerfile: 937B done
#1 DONE 0.0s
 
#2 [internal] load .dockerignore
#2 sha256:0203b9250246d2de8f166927f6cb4e4465272ed737f3d52ee6988b7b9c6fa73b
#2 transferring context: 64B done
#2 DONE 0.0s
 
#3 [internal] load metadata for docker.io/library/node:18-alpine
#3 sha256:c7ddcdb449347fb14fd88eab6b6351683fc669399d296a38e5a23e64c4ea7112
 
#3 DONE 0.4s
 
#4 [node 1/1] FROM docker.io/library/node:18-alpine@sha256:a136ed7b0df71082cdb171f36d640ea3b392a5c70401c642326acee767b8c540
#4 sha256:26013720e612e1f92a8bac8234015e89ae1e5cf6640918e56301d8ff87601789
#4 resolve docker.io/library/node:18-alpine@sha256:a136ed7b0df71082cdb171f36d640ea3b392a5c70401c642326acee767b8c540 0.0s done
#4 CACHED
 
#9 [internal] load build context
#9 sha256:c7e7da085b74e802a6235891af7e9dc625b57c9b0569c351917cc62ebd9b31e6
 
#9 transferring context: 377.25kB 0.0s done
#9 DONE 0.0s
 
#5 [base 1/1] RUN apk --no-cache -U upgrade # To ensure any potential security patches are applied.
#5 sha256:6112b1437e38c1370bec230b18e200c160ef88c3a1f12aa8e99c5397abe66533
 
#5 0.417 fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/x86_64/APKINDEX.tar.gz
 
#5 0.613 fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gz
 
#5 0.959 OK: 9 MiB in 17 packages
 
#5 DONE 1.1s
 
#6 [server-production 1/5] WORKDIR /app
#6 sha256:4b3a850c2d0a0888d527a599ae039a7719e32cb618786e58d9b7174a342e2d35
#6 DONE 0.1s
 
#7 [server-builder 1/6] RUN apk add --no-cache build-base libtool autoconf automake python3
#7 sha256:2738653899cc933564b20df5577a21530b6c4c578243c3ca28785a6be072b0aa
 
#7 0.427 fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/x86_64/APKINDEX.tar.gz
 
#7 0.630 fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gz
 
#7 0.966 (1/35) Installing m4 (1.4.19-r1)
#7 0.981 (2/35) Installing libbz2 (1.0.8-r4)
#7 0.991 (3/35) Installing perl (5.36.0-r0)
 
#7 1.393 (4/35) Installing autoconf (2.71-r1)
#7 1.424 (5/35) Installing automake (1.16.5-r1)
#7 1.454 (6/35) Installing binutils (2.39-r2)
 
#7 1.536 (7/35) Installing libmagic (5.43-r0)
#7 1.574 (8/35) Installing file (5.43-r0)
#7 1.582 (9/35) Installing libgomp (12.2.1_git20220924-r4)
#7 1.595 (10/35) Installing libatomic (12.2.1_git20220924-r4)
#7 1.603 (11/35) Installing gmp (6.2.1-r2)
#7 1.620 (12/35) Installing isl25 (0.25-r0)
#7 1.649 (13/35) Installing mpfr4 (4.1.0-r0)
 
#7 1.684 (14/35) Installing mpc1 (1.2.1-r1)
#7 1.694 (15/35) Installing gcc (12.2.1_git20220924-r4)
 
#7 2.734 (16/35) Installing libstdc++-dev (12.2.1_git20220924-r4)
 
#7 3.083 (17/35) Installing musl-dev (1.2.3-r4)
 
#7 3.165 (18/35) Installing libc-dev (0.7.2-r3)
#7 3.174 (19/35) Installing g++ (12.2.1_git20220924-r4)
 
#7 3.472 (20/35) Installing make (4.3-r1)
#7 3.483 (21/35) Installing fortify-headers (1.1-r1)
#7 3.495 (22/35) Installing patch (2.7.6-r8)
#7 3.505 (23/35) Installing build-base (0.5-r3)
#7 3.513 (24/35) Installing libltdl (2.4.7-r0)
#7 3.524 (25/35) Installing libtool (2.4.7-r0)
#7 3.551 (26/35) Installing libexpat (2.5.0-r0)
#7 3.560 (27/35) Installing libffi (3.4.4-r0)
 
#7 3.569 (28/35) Installing gdbm (1.23-r0)
#7 3.578 (29/35) Installing xz-libs (5.2.9-r0)
#7 3.588 (30/35) Installing mpdecimal (2.5.1-r1)
#7 3.598 (31/35) Installing ncurses-terminfo-base (6.3_p20221119-r0)
#7 3.610 (32/35) Installing ncurses-libs (6.3_p20221119-r0)
#7 3.625 (33/35) Installing readline (8.2.0-r0)
#7 3.636 (34/35) Installing sqlite-libs (3.40.0-r0)
#7 3.657 (35/35) Installing python3 (3.10.9-r1)
 
#7 4.186 Executing busybox-1.35.0-r29.trigger
#7 4.198 OK: 339 MiB in 52 packages
 
#7 DONE 4.8s
 
#8 [server-builder 2/6] WORKDIR /app
#8 sha256:15d6635766e37746ebf1d35c9c33c2397624c63eb47cd1f03566d2daf142d6a6
#8 DONE 0.0s
 
#10 [server-builder 3/6] COPY server/package*.json ./server/
#10 sha256:63625c45742b20381e116ae1c45b90795d73425ef6b1aefbf42f2d6666c1a26f
 
#10 DONE 0.0s
 
#11 [server-builder 4/6] RUN cd server && npm install
#11 sha256:5a5b31446897bc32c1c43ae8f7cde178d3106aadae9f714365bddb90c0a64f6c
 
#11 7.251 npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
 
#11 8.971 npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
 
#11 25.05
#11 25.05 > server@0.0.0 postinstall
#11 25.05 > patch-package
#11 25.05
 
#11 25.29 patch-package 6.5.0
#11 25.29 Applying patches...
#11 25.29 No patch files found
#11 25.31
#11 25.31 added 433 packages, and audited 434 packages in 24s
 
#11 25.31
#11 25.31 87 packages are looking for funding
#11 25.31   run `npm fund` for details
#11 25.35
#11 25.35 9 high severity vulnerabilities
#11 25.35
#11 25.35 To address issues that do not require attention, run:
#11 25.35   npm audit fix
#11 25.35
#11 25.35 To address all issues (including breaking changes), run:
#11 25.35   npm audit fix --force
#11 25.35
#11 25.35 Run `npm audit` for details.
#11 25.35 npm notice
 
#11 25.35 npm notice New major version of npm available! 8.19.2 -> 9.2.0
#11 25.35 npm notice Changelog: <[https://github.com/npm/cli/releases/tag/v9.2.0>](https://github.com/npm/cli/releases/tag/v9.2.0%3E);
#11 25.35 npm notice Run `npm install -g npm@9.2.0` to update!
#11 25.35 npm notice
 
#11 DONE 26.3s
 
#12 [server-builder 5/6] COPY db/schema.prisma ./db/
#12 sha256:e21daa1435599f80bdabd2b4f96a4f9f9b4635140b095c192ee18df763923af0
#12 DONE 0.1s
 
 
#13 [server-builder 6/6] RUN cd server && npx prisma generate --schema=../db/schema.prisma
#13 sha256:23999809373d417e6bb591f2d43b91b2ff20b37098f685e458c530e1d0da2d2f
 
#13 2.864 Prisma schema loaded from ../db/schema.prisma
 
#13 3.436 Error: Unable to establish a connection to query-engine-node-api library. It seems there is a problem with your OpenSSL installation!
#13 3.436 Details: Unable to require(`/app/server/node_modules/prisma/libquery_engine-linux-musl.so.node`)
#13 3.436  Error loading shared library libssl.so.1.1: No such file or directory (needed by /app/server/node_modules/prisma/libquery_engine-linux-musl.so.node)
#13 3.436 [Context: getConfig]
#13 3.436
#13 3.436 Prisma CLI Version : 4.5.0
 
#13 ERROR: executor failed running [/bin/sh -c cd server && npx prisma generate --schema=../db/schema.prisma]: exit code: 1
-----
> [server-builder 6/6] RUN cd server && npx prisma generate --schema=../db/schema.prisma:
-----
executor failed running [/bin/sh -c cd server && npx prisma generate --schema=../db/schema.prisma]: exit code: 1

Desktop (please complete the following information):

  • OS: arch linux
@Martinsos
Copy link
Member

Martinsos commented Dec 13, 2022

Thanks for reporting this!

What happened is that in the new node-alpine Docker image, which we started using with Beta release since we upgraded the version of node we use, they by default ship openssl 3, instead of the openssl 1.1 that was shipped with it before. This by itself shouldn't be an issue, but, Prisma doesn't support openssl 3 when running it on alpine, for now! So while waiting for that, we need to use openssl 1.1

Quick fix for you is to add openssl1.1-compat at the end of RUN apk add --no-cache ... line in the .wasp/build/Dockerfile. You will have to add it again if Wasp regenerates the project, so that is not great, but it will fix the issue.

We will make sure to fix this soon and release a Wasp version that has it fixed!

@Martinsos
Copy link
Member

Related Prisma issue here: prisma/prisma#16553 .

@Martinsos
Copy link
Member

New release is out, that fixes this! https://github.com/wasp-lang/wasp/releases/tag/v0.7.2 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants