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

Simple express app segfaults in alpine Docker image #319

Open
serenitus opened this issue Nov 8, 2023 · 2 comments
Open

Simple express app segfaults in alpine Docker image #319

serenitus opened this issue Nov 8, 2023 · 2 comments

Comments

@serenitus
Copy link

serenitus commented Nov 8, 2023

I have a very simple express app that runs perfectly well locally (Intel Mac, Sonoma) but segfaults when run using the latest official alpine Docker image.

Dockerfile:

FROM denoland/deno:alpine-1.38.0

EXPOSE 8080

WORKDIR /app

RUN apk add --no-cache bash coreutils grep sed

USER deno

ADD . .

CMD ["run", "--allow-all", "main.ts"]
# CMD ["--version"]

main.ts:

import express from 'npm:express@4.18.2';

const app = express();

Running with: docker run -d --init -it -p 8080:8080 app

deno itself runs just fine as can be seen by trying the --version command currently commented out in the Docker file or, in fact, trying any other trivial code such as console.log().

Can anyone figure out what the issue is?

@serenitus
Copy link
Author

serenitus commented Nov 8, 2023

I have managed to make this work with alpine-1.34.0 but haven't narrowed the issue down any further than that as yet.

Update: it broke with alpine-1.37.2

@serenitus
Copy link
Author

serenitus commented Nov 8, 2023

Actually, that turned out to be a bit misleading. While 1.37.2 dies immediately, 1.37.1 and 1.37.0 die after a second or too. I was misled by their fleeting presence in the docker ps list.

alpine-1.36.4 actually seems to be the last stable release.

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

No branches or pull requests

1 participant