{"id":15735520,"url":"https://github.com/nwylynko/docker-bun","last_synced_at":"2025-03-13T07:31:52.065Z","repository":{"id":100320900,"uuid":"528277019","full_name":"NWylynko/docker-bun","owner":"NWylynko","description":"Docker files for the TS runtime Bun (https://bun.sh) made by Oven","archived":false,"fork":false,"pushed_at":"2022-10-28T02:32:08.000Z","size":19,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T11:11:17.496Z","etag":null,"topics":["bun","docker","docker-image","dockerfile","javascript","typescript"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/nwylynko/bun","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NWylynko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-24T05:21:50.000Z","updated_at":"2024-02-16T06:49:45.000Z","dependencies_parsed_at":"2023-05-13T18:30:52.992Z","dependency_job_id":null,"html_url":"https://github.com/NWylynko/docker-bun","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":0.3157894736842105,"last_synced_commit":"364ad6283803e51ac632590450e916ee3fec4709"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NWylynko%2Fdocker-bun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NWylynko%2Fdocker-bun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NWylynko%2Fdocker-bun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NWylynko%2Fdocker-bun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NWylynko","download_url":"https://codeload.github.com/NWylynko/docker-bun/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243361368,"owners_count":20278556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bun","docker","docker-image","dockerfile","javascript","typescript"],"created_at":"2024-10-04T01:13:56.096Z","updated_at":"2025-03-13T07:31:52.051Z","avatar_url":"https://github.com/NWylynko.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-bun\ndocker files for bun and github actions to build base docker images and push them to dockerhub \nhttps://hub.docker.com/r/nwylynko/bun\n\n\nhttps://bun.sh/ base images to run your bun service on top of.\n\nCurrent have ubuntu and alpine images\n```dockerfile\nFROM nwylynko/bun:0.2.0-alpine\nFROM nwylynko/bun:0.2.0-ubuntu\n```\n\nRepo: https://github.com/NWylynko/docker-bun\n\nExample for using bun for npm deps and to run typescript\n```dockerfile\nFROM nwylynko/bun:0.2.0-alpine\n\n# copy over codebase\nCOPY . .\n\n# install NPM modules\nRUN bun install\n\n# bundle up npm modules so bun can read them in faster\nRUN bun bun ./index.ts\n\n# start the service\nCMD [\"bun\", \"run\", \"./index.ts\"]\n```\n\nExample for using bun for npm deps and running tsc but node for running service. This has no runtime benefit but should speed up your CI/CD pipeline, resulting in faster deploys.\n```dockerfile\nFROM nwylynko/bun:0.2.0-alpine as Deps\nWORKDIR /app\n\n# copy in the package and lock from codebase\nCOPY ./package.json ./bun.lockb ./\n\n# install dependencies\nRUN bun install\n\nFROM nwylynko/bun:0.2.0-alpine as Builder\nWORKDIR /app\n\n# copy in everything we need to build the source code\nCOPY ./tsconfig.json ./\nCOPY --from=Deps /app .\nCOPY src/ src/\n\n# run our build step\nRUN bun run build\n\nFROM node:18.11.0-alpine as Runner\nWORKDIR /app\n\n# copy in everything we need to run the service\nCOPY ./package.json ./\nCOPY --from=Builder /app/dist ./dist\n\nENV NODE_ENV=production\n\nCMD [\"yarn\", \"start\"]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwylynko%2Fdocker-bun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwylynko%2Fdocker-bun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwylynko%2Fdocker-bun/lists"}