-
Notifications
You must be signed in to change notification settings - Fork 3
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
ENOENT: No such file or directory
error during build in docker in github actions
#122
Comments
Could you share the dockerfile you used for this? I can't reproduce this at the moment |
I delete the code from my repo FROM alpine:latest as downloader
ARG VERSION=0.19.4
ARG ARCH=linux_amd64
RUN wget https://github.com/pocketbase/pocketbase/releases/download/v${VERSION}/pocketbase_${VERSION}_${ARCH}.zip \
&& unzip pocketbase_${VERSION}_${ARCH}.zip -d /tmp/ \
&& chmod +x /tmp/pocketbase
FROM alpine:latest as base
WORKDIR /app
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
COPY --from=downloader /tmp/pocketbase /app/pocketbase
EXPOSE 8090
CMD ["./pocketbase", "serve", "--http=0.0.0.0:8090"]
FROM oven/bun:1.0 as frontend
WORKDIR /app
COPY ./ ./
RUN bun install
RUN bun run build
FROM base as prod
COPY ./pocketbase/pb_hooks /app/pb_hooks
COPY ./pocketbase/pb_migrations /app/pb_migrations
COPY --from=frontend /app/build /app/pb_public The error occurs after install |
Also have this issue. Here is my Dockerfile # syntax = docker/dockerfile:1
# Adjust BUN_VERSION as desired
ARG BUN_VERSION=1.1.8
FROM oven/bun:${BUN_VERSION}-slim as base
LABEL fly_launch_runtime="SvelteKit"
# SvelteKit app lives here
WORKDIR /app
# Set production environment
ENV NODE_ENV="production"
# Throw-away build stage to reduce size of final image
FROM base as build
# Install packages needed to build node modules
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config python-is-python3
# Install node modules
COPY --link bun.lockb package.json ./
RUN bun install
# Copy application code
COPY --link . .
# Build application
RUN bun --bun run build
# Remove development dependencies
RUN rm -rf node_modules && \
bun install --ci
# Final stage for app image
FROM base
# Copy built application
COPY --from=build /app/build /app/build
COPY --from=build /app/node_modules /app/node_modules
COPY --from=build /app/package.json /app
# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD [ "bun", "run", "start" ] |
Everyone seems to be using |
Yes the issue also exists when using a node runtime as well. |
@dihmeetree can you try without the --link ? |
I can only reproduce this when using # Use the official Node.js image as a base image
FROM node:18
WORKDIR /app
COPY . .
RUN npm install
RUN npm run build
CMD ["npm", "run", "preview"] |
Thanks Loris.. gave Node another shot. It does indeed work. I maybe have been misconfiguring the Dockerfile so it couldn't find the FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./project.inlang .
RUN apk add --no-cache curl
RUN npm ci
COPY . .
RUN npm run build
RUN npm prune --production
FROM node:18-alpine
WORKDIR /app
COPY --from=builder /app/build build/
COPY --from=builder /app/node_modules node_modules/
COPY package.json .
EXPOSE 3000
ENV NODE_ENV=production
CMD [ "node", "build" ] |
try the dockerfile below this is the workaround because paraglide js needs some APIs that bun doesnt provide and alpine image has other missing libraries that bun package needs, so ended up having the full size node image to install bun and use bun
|
Hey, is there any update for that issue? This is my Dockerfile, that doesnt work
|
did anyone manage to fix it using bun? |
I have my dockerfile working, see above The bun official image doesn't have some node API that paraglide needs, a workaround is to use node image and install bun then use bun as worker |
Hey everyone, I am taking over Paraglide JS again this week. I am closing this issue as the 2.0 release is the top prio atm #201 |
Cross-referencing the same issue in the Bun repo – oven-sh/bun#12777 (comment) |
Hello, Im currently facing this issue in my sveltekit project
github repo of my project
The text was updated successfully, but these errors were encountered: