bun
bun copied to clipboard
Remix Docker Issues
What version of Bun is running?
1.0.14+d8be3e51b
What platform is your computer?
Darwin 23.1.0 arm64 arm
What steps can reproduce the bug?
- bun create remix
- Change
renderToPipeableStreamimport inentry.server.tsxtoimport { renderToPipeableStream } from "react-dom/server.node";(Without this the docker build is crashing. That also comes up in this Issue) - Add "normal" Dockerfile:
Dockerfile
FROM oven/bun:1 as base
WORKDIR /usr/src/app
# Install dependencies and cache
FROM base AS install
RUN mkdir -p /temp/dev
COPY package.json bun.lockb /temp/dev/
RUN cd /temp/dev && bun install --frozen-lockfile --ignore-scripts
# install with --production (exclude devDependencies)
RUN mkdir -p /temp/prod
COPY package.json bun.lockb /temp/prod/
RUN cd /temp/prod && bun install --frozen-lockfile --production --ignore-scripts
# Copy node modules from dev to prod
FROM base AS prerelease
COPY --from=install /temp/dev/node_modules node_modules
COPY . .
ENV NODE_ENV=production
RUN bun run build
FROM base AS release
ENV NODE_ENV=production
COPY --from=install /temp/prod/node_modules node_modules
COPY --from=prerelease /usr/src/app/build build
COPY --from=prerelease /usr/src/app/public public
COPY --from=prerelease /usr/src/app/package.json .
ADD . .
CMD [ "bun", "start" ]
docker build -t my-app .&docker run -p 3000:3000 my-app
What is the expected behavior?
Website is working in Browser
Remix log
$ remix-serve ./build/index.js
[remix-serve] http://localhost:3000/ (http://172.17.0.2:3000/)
Expected a Response object
GET / - - - 14.717 ms
What do you see instead?
When visiting localhost the browser behaves very strangely, if I visit localhost on a tab that has another page open, the request just refreshes the old page. If I try to visit localhost from a new tab, it just clears the address bar and does nothing.
Additional information
No response
Hey @Electroid, did you have time to investigate this?
Would really love to use bun for a small prod app at my job, but this is holding me back.
yeah this and prisma generate not working in docker are huge bummers for me... if these two issues were solved (https://github.com/oven-sh/bun/issues/5320) then i could actually use bun after spending a few hours making tweaks to fix other problems... its too bad because bun is so fast but a lot of common libraries just dont work
Having same problem. It seems related with : https://github.com/oven-sh/bun/issues/9949
bumping- same issue here