node-flywaydb icon indicating copy to clipboard operation
node-flywaydb copied to clipboard

Flyway error with node alpine containers

Open royprigat opened this issue 4 years ago • 4 comments

Hi,

I am facing an issue when attempting to run the node-flywaydb(v.3.0.3) migration script within a node container.

The migrate script runs fine within a regular node container, for example node:12.0.0, but when I run it within node:12.0.0-alpine the script seems to throw the following error:

image

Might be hard to see from the image, so here is the error text: stderr: /app/node_modules/node-flywaydb/jlib/flyway-commandline-7.8.2/flyway-7.8.2/flyway: line 83: /app/node_modules/node-flywaydb/jlib/flyway-commandline-7.8.2/flyway-7.8.2/jre/bin/java: No such file or directory

Again, this only happens in containers with 'alpine' versions.

Please advise,

Thanks

royprigat avatar May 06 '21 07:05 royprigat

Hi Roy,

I don't have a ton of experience with alpine containers. I would take a look at the folder structure to see if the files actually exist and then go from there.

Sorry I'm not much more help, let me know if you find that it's a problem with the library.

markgardner-fhd avatar May 06 '21 17:05 markgardner-fhd

Second thought, are you able to confirm that tar is available? Alpine might not have that by default. That would cause this to fail https://github.com/markgardner/node-flywaydb/blob/master/lib/download.js#L217 and I might not be handling that failure correctly.

markgardner-fhd avatar May 06 '21 18:05 markgardner-fhd

Hi Mark,

I tried your suggestion but I still get the same error.

here is my Dockerfile line that adds missing modules into the docker RUN apk add git openssh-client bash tar

could you think of any other modules that might be missing that could cause this issue?

BTW - Roy and I are on the same team :)

shmaram avatar May 09 '21 07:05 shmaram

sorry for the long delay, I'll have to see if I can reproduce the problem. I'll get back to you with what I find.

markgardner avatar May 12 '21 18:05 markgardner