Giter Club home page Giter Club logo

bun-node's Introduction

Bun and Node.js Docker Images: Optimize Your Development Workflow ๐Ÿ‡ ๐Ÿณ ๐Ÿข ๐Ÿš€

dockeri.co

GitHub issues GitHub stars

This repository offers pre-configured Docker images combining Bun, with Node.js, the popular JavaScript runtime. Ideal for development, testing, and production environments.

Use node.js as runtime, and bun as package manager, etc. The node.js in this docker image functions as fallback when bun is not implement the feature yet.

Features

  • Multiple Node.js Versions: Supports Node.js versions which currently supported by docker-node
  • Variety of Builds: Available in Alpine, Debian, and Slim versions

Quick Start

docker pull imbios/bun-node

Build Types

  • alpine: Minimal build ideal for smaller footprint
  • debian: Standard build, balanced between size and features
  • slim: Debian-based but lighter, stripped of unnecessary files

Advanced Image Tagging

imbios/bun-node:<bun-version>-<node-version>-<build-type>[optional -git]
  • bun-version: Bun version (e.g. 1.0.0, 1.0.30, 1) or tag (e.g. latest or canary)
  • node-version: Node.js version (e.g. 18, 20.11, 21.7.1) or tag (e.g. hydrogen, iron, current)
  • build-type: Build type (e.g. alpine, debian, slim)
  • optional -git: Optional git tag, an alpine image with git installed

Show Your Support ๐ŸŒŸ๐Ÿ’ธ

If you find this Docker image useful, please consider giving it a star on GitHub and Dockerhub, or even better, a donations! Your support encourages me to keep maintaining and improving it.

Contribution

Feel free to contribute by submitting pull requests or by reporting issues.

License

This project is licensed under the MIT License.


For custom configurations and support, visit Project Wiki or Issues.

Keywords

Docker, Node.js, Bun, Development, Deployment, Alpine, Debian, Slim

bun-node's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar imbios avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

senin1724

bun-node's Issues

[FEAT]: Able to choose Bun version

Clear and concise description of the problem

  • able to choose Node.js version
  • able to choose Linux flavor
  • able to choose Bun version

Suggested solution

No response

Alternative

No response

Additional context

No response

Validations

[BUG]: latest update broke everything

Description of the bug

Sorry, not sure how to debug what's happening. I was testing an image a few mins ago (before the update) and everything was working, then the docker image was updated, I saw docker downloading new layers, and now bun install doesn't work anymore

#8 [ 4/11] RUN bun install --frozen-lockfile
#8 0.086 bun install v1.0.8 (2a405f69)
#8 0.089 error: Unexpected installing @remix-run/dev
#8 0.089 error: Unexpected installing @remix-run/eslint-config
.... many other packages not being installed .....
.... many other packages not being installed .....
.... many other packages not being installed .....
#8 0.118 [35.00ms] done
#8 DONE 0.1s

Environment


  System:
    OS: macOS 14.0
    CPU: (10) arm64 Apple M1 Max
    Memory: 3.79 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.0 - ~/.nvm/versions/node/v18.18.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.18.0/bin/yarn
    npm: 9.8.1 - ~/.nvm/versions/node/v18.18.0/bin/npm
    pnpm: 8.8.0 - ~/Library/pnpm/pnpm
    bun: 1.0.8 - ~/.bun/bin/bun
  Languages:
    Bash: 3.2.57 - /bin/bash
    Perl: 5.30.3 - /usr/bin/perl
    Python3: 3.9.6 - /usr/bin/python3
    Ruby: 2.6.10 - /usr/bin/ruby
  Browsers:
    Chrome: 119.0.6045.105
    Safari: 17.0
  npmPackages:
    @remix-run/dev: ^2.2.0 => 2.2.0 
    @remix-run/eslint-config: ^2.2.0 => 2.2.0 
    @remix-run/node: ^2.2.0 => 2.2.0 
    @remix-run/react: ^2.2.0 => 2.2.0 
    @remix-run/serve: ^2.2.0 => 2.2.0 
    @types/react: ^18.2.20 => 18.2.34 
    @types/react-dom: ^18.2.7 => 18.2.14 
    autoprefixer: ^10.4.16 => 10.4.16 
    eslint: ^8.38.0 => 8.53.0 
    isbot: ^3.6.8 => 3.7.0 
    miniflare: ^3.20231025.1 => 3.20231025.1 
    postcss: ^8.4.31 => 8.4.31 
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 
    tailwindcss: ^3.3.5 => 3.3.5 
    typescript: ^5.1.6 => 5.2.2 
    vite: ^4.5.0 => 4.5.0 
    vite-tsconfig-paths: ^4.2.1 => 4.2.1 

Steps To Reproduce

FROM imbios/bun-node:20-slim
WORKDIR /usr/src/app

# Copy the package files and install dependencies
COPY . .
RUN bun install --frozen-lockfile
ENV NODE_ENV=production
RUN bun run build

Additional Information

No response

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

[BUG]: `latest` tag isn't pinned to `latest-iron-debian`

Description of the bug

image

latest tag in dockerhub should be pinned to latest-iron-debian, but currently, it's pinned to latest-current-debian.

Environment

should be not necessary

Steps To Reproduce

should be not necessary

Additional Information

No response

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

[FEAT]: Add git to alpine image

Clear and concise description of the problem

Hi,

I am trying to execute chromatic with turbosnap in alpine image but I can't because it wouldn't have git, so if would be great if this image can has git

Suggested solution

No response

Alternative

No response

Additional context

No response

Validations

[FEAT]: Add Integration Testing

Clear and concise description of the problem

As more and more people use this docker image as their production image, testing each new build became an urgent adoption-blocking necessity.

Suggested solution

  • Keep It Simple (just test the build process)
  • Popular framework with build and compilation required
    • Next.js
    • Nuxt.js
    • Remix
    • Astro
    • Qwik

Alternative

No response

Additional context

No response

Validations

[BUG]: Permission denied when executing docker-entrypoint.sh

Description of the bug

I'm taking advantaged of imbios/bun-node:latest to containerized my Next.js app using the Dockerfile from the example.

When I try to run the built container, it gets into error with following messages:

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/usr/local/bin/docker-entrypoint.sh": permission denied: unknown

This problem is also observed by directly building and running the Next.js app example.

I think there's some problems with the permission of /usr/local/bin/docker-entrypoint.sh in the container. By simply adding

RUN chmod +x /usr/local/bin/docker-entrypoint.sh

to the Dockerfile, the problem gets fixed.

Besides, there's a typo in the 8th line of the example Dockerfile, where bun.lockb is mistyped as bun.lock.

Environment

  System:
    OS: Linux 6.6 Arch Linux
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i5-13600K
    Memory: 13.50 GB / 31.09 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 21.5.0 - /usr/bin/node
    npm: 10.2.5 - /usr/bin/npm
    pnpm: 8.14.0 - /usr/bin/pnpm
    bun: 1.0.21 - /usr/bin/bun
  Languages:
    Bash: 5.2.21 - /usr/bin/bash
    Java: 1.8.0_392 - /usr/bin/javac
    Perl: 5.38.1 - /usr/bin/perl
    Protoc: 25.1 - /usr/bin/protoc
    Python: 3.11.6 - /usr/bin/python
    Python3: 3.11.6 - /usr/bin/python3

Steps To Reproduce

  1. Clone the repository;
  2. Run cd examples/next/default-app-dir;
  3. Run docker buildx build . -t next-app-example to build the image;
  4. Run docker run next-app-example to run the container.

Additional Information

No response

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

[FEAT]: Create Simple Integration Testing

Clear and concise description of the problem

Integration tests that run in each PR:

  • Next.js Standalone deployment
  • Astro
  • Nuxt.js
  • Remix
  • Qwik

Suggested solution

No response

Alternative

No response

Additional context

No response

Validations

[BUG]: Current Node.js version file is on the 21, not 20, 18, or 16

Description of the bug

Node.js build trigger in last_nodejs.txt is in 21.

Environment

Steps To Reproduce

Additional Information

I'd recommend creating 3 separate nodejs LTS files and trigger build only the changed version.

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

[BUG]: There's still several images with permission issue

Description of the bug

We need to rebuild and repush each of the images containing the permission bug in #10.

TODO:

  • Determine the images affected by #10
  • Create a script to automate the rebuild tasks
  • Run as GitHub Action special for #10 issue

Environment

Check related issue

Steps To Reproduce

Check related issue

Additional Information

Related:

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Thumbs-up (๐Ÿ‘) count in each issue is considered as the value of the issue. The more thumbs-up, the more we prioritize it.

[FEAT]: More Informative Image Version Tracking Commit Message

Clear and concise description of the problem

image

Current:

build: update versions

Proposed:

build: update images version

- bun: (canary) 1.2.0-canary, (latest) 1.1.2
- nodejs: (lts-iron) 20.3.4
- distro: alpine, debian, slim

Add description body to the commit message for better readability and history.

Suggested solution

No response

Alternative

No response

Additional context

No response

Validations

[BUG]: Debian image uses debian:bullseye-slim instead of debian:bullseye

Description of the bug

I need to use the standard debian image, but I can't with this particular setup

Environment

n/a

Steps To Reproduce

https://github.com/ImBIOS/bun-node/blob/main/20/debian/dockerfile#L1

Additional Information

No response

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.