Create a new DigitalOcean Container Registry
Create a new Container Registry to store the Docker image. Through the DigitalOcean dashboard Through the DigitalOcean CLIIn the DigitalOcean dashboard, go to Container Registry, and enter the details for the new registry.Make sure the details are correct, then click Create Registry.terminalCopydoctl registry create bun-digitalocean-demo CopyName Endpoint Region slug bun-digitalocean-demo registry.digitalocean.com/bun-digitalocean-demo sfo2 You should see the new registry in the DigitalOcean registry dashboard:2Create a new Dockerfile
Make sure you’re in the directory containing your project, then create a new Dockerfile in the root of your project. This file contains the instructions to initialize the container, copy your local project files into it, install dependencies, and start the application.DockerfileCopy# Use the official Bun image to run the application FROM oven/bun:debian # Set the work directory to `/app` WORKDIR /app # Copy the package.json and bun.lock into the container COPY package.json bun.lock ./ # Install the dependencies RUN bun install --production --frozen-lockfile # Copy the rest of the application into the container COPY . . # Expose the port (DigitalOcean will set PORT env var) EXPOSE 8080 # Run the application CMD ["bun", "index.ts"] Make sure that the start command corresponds to your application’s entry point. This can also be CMD ["bun", "run", "start"] if you have a start script in your package.json.This image installs dependencies and runs your app with Bun inside a container. If your app doesn’t have dependencies, you can omit the RUN bun install --production --frozen-lockfile line.Create a new .dockerignore file in the root of your project. This file contains the files and directories that should be excluded from the container image, such as node_modules. This makes your builds faster and smaller:.dockerignoreCopynode_modules Dockerfile* .dockerignore .git .gitignore README.md LICENSE .vscode .env # Any other files or directories you want to exclude 3Authenticate Docker with DigitalOcean registry
Before building and pushing the Docker image, authenticate Docker with the DigitalOcean Container Registry:terminalCopydoctl registry login CopySuccessfully authenticated with registry.digitalocean.com This command authenticates Docker with DigitalOcean’s registry using your DigitalOcean credentials. Without this step, the build and push command will fail with a 401 authentication error.4Build and push the Docker image to the DigitalOcean registry
Make sure you’re in the directory containing your Dockerfile, then build and push the Docker image to the DigitalOcean registry in one command:terminalCopydocker buildx build --platform=linux/amd64 -t registry.digitalocean.com/bun-digitalocean-demo/bun-digitalocean-demo:latest --push . If you’re building on an ARM Mac (M1/M2), you must use docker buildx with --platform=linux/amd64 to ensure compatibility with DigitalOcean’s infrastructure. Using docker build without the platform flag will create an ARM64 image that won’t run on DigitalOcean.Once the image is pushed, you should see it in the DigitalOcean registry dashboard:5Create a new DigitalOcean App Platform project
In the DigitalOcean dashboard, go to App Platform > Create App. We can create a project directly from the container image.Make sure the details are correct, then click Next.Review and configure resource settings, then click Create app.6Visit your live application
🥳 Your app is now live! Once the app is created, you should see it in the App Platform dashboard with the public URL.Was this page helpful?
YesNoSuggest editsRaise issueDeploy a Bun application on AWS LambdaPreviousDeploy a Bun application on Google Cloud RunNext⌘IxgithubdiscordyoutubePowered by智能索引记录
-
2026-02-28 10:22:44
综合导航
成功
标题:Utah’s Strong Effort Leads to 4-1 Win over Detroit Utah Mammoth
简介:The Mammoth enter the Olympic break with two-straight wins a
-
2026-03-01 08:52:56
综合导航
成功
标题:My Home Design Dreams - Play Online For Free
简介:Play My Home Design Dreams game online for free on YAD. The
-
2026-02-28 03:38:27
综合导航
成功
标题:18luck新利官网利app-你玩乐的的好帮手
简介:18luck新利官网专注于为玩家打造无忧的游戏环境。其官方应用程序以简洁流畅的设计、便捷的操作体验和丰富的游戏内容,成为
-
2026-02-28 02:54:34
游戏娱乐
成功
标题:大皇帝司马炎体系怎么玩 阵容搭配技巧_欢乐园游戏
简介:在大皇帝游戏里成型的司马炎体系需要我们将防御堆到很高的程度,这对阵型的要求是比较大的,根据以上的特点,小编特别推荐下面两
-
2026-02-28 08:47:32
综合导航
成功
标题:Beckhams' nanny gives undertakings - 5RB Barristers
简介:Beckhams
-
2026-02-27 22:46:43
综合导航
成功
标题:1E Digital Employee Experience (DEX) Platform - 1E
简介:Transform digital employee experience with 1E
-
2026-03-01 00:45:53
综合导航
成功
标题:Erweiterte Suche - CHT Gruppe - Spezialchemikalien
简介:CHT - chemische Hilfsmittel und Spezialitäten-Chemie für Tex
-
2026-02-28 02:24:49
综合导航
成功
标题:2020四川中级注册安全工程师报名入口8月17日-9月7日开通-中级注册安全工程师-233网校
简介:2020年四川中级注册安全工程师报名入口开通时间为8月17日-9月7日。【2020考务通知 报名照片一键处理 &n
-
2026-03-01 12:39:15
综合导航
成功
标题:(推荐)我的课余生活三年级作文
简介:在我们平凡的日常里,大家都尝试过写作文吧,写作文是培养人们的观察力、联想力、想象力、思考力和记忆力的重要手段。相信写作文
-
2026-02-28 00:08:17
综合导航
成功
标题:Initiating Artificial Intelligence Transactions: A Legal Analysis Law.com
简介:This article explores how traditional software liability con
-
2026-02-28 00:37:27
新闻资讯
成功
标题:602《攻城掠地》166服7月9日13时火爆开启 - 新闻公告 - 602游戏平台 - 做玩家喜爱、信任的游戏平台!cccS
简介:602《攻城掠地》166服7月9日13时火爆开启
-
2026-03-01 08:42:50
综合导航
成功
标题:Book flights
简介:Book your next flight from Düsseldorf at dus.com! All destin
-
2026-03-01 12:33:11
教育培训
成功
标题:二年级作文300字[通用3篇]
简介:在生活、工作和学习中,大家都不可避免地会接触到作文吧,作文可分为小学作文、中学作文、大学作文(论文)。相信许多人会觉得作
-
2026-02-28 01:25:31
综合导航
成功
标题:Read the latest Blogs, Articles and Press Releases from VC4
简介:Read VC4’s latest blogs, articles and press releases for exp
-
2026-03-01 00:28:12
综合导航
成功
标题:Startseite - VTE-FILTER GmbH
简介:VTE ist einer der weltweit führenden Experten für Ersatzteil
-
2026-03-01 06:35:25
综合导航
成功
标题:[暑假生活]寒雪城_250字_作文网
简介:北风呼啸,大雪纷飞,在这个布满冰晶的世界,魏龙骑左顾右看,望了望这个世界,突然,一声巨响,划破死一般的沉寂,一直狼王带着
-
2026-02-28 01:23:03
综合导航
成功
标题:City Bus Simulator - Play The Free Mobile Game Online
简介:City Bus Simulator - click to play online. City Bus Simulato
-
2026-03-01 08:12:41
教育培训
成功
标题:平凡生活初中作文
简介:无论在学习、工作或是生活中,大家都不可避免地会接触到作文吧,作文是从内部言语向外部言语的过渡,即从经过压缩的简要的、自己
-
2026-02-27 23:00:40
综合导航
成功
标题:What Is Service Inventory in Telecom? - VC4
简介:Get the latest information about what Service Inventory is a
-
2026-02-28 00:32:43
综合导航
成功
标题:Comprar iPhone Air de 1 TB – Preto-espacial - Apple (BR)
简介:Confira os novos iPhone Air da Apple. Compre online com fret
-
2026-03-01 08:48:12
图片素材
成功
标题:天使的作文 描写天使的作文 关于天使的作文 素材-作文网
简介:作文网精选关于天使的作文,包含天使的作文素材,关于天使的作文题目,以天使为话题的作文大全,作文网原创名师点评,欢迎投稿!
-
2026-02-28 01:22:00
综合导航
成功
标题:CHA18 - StrongShop
简介:Item Name : CHA18 Description : SNAKE W/ MONEY BAG Packi
-
2026-03-01 08:24:51
图片素材
成功
标题:爱的作文350字 描写爱的作文 关于爱的作文-作文网
简介:作文网精选关于爱的350字作文,包含爱的作文素材,关于爱的作文题目,以爱为话题的350字作文大全,作文网原创名师点评,欢
-
2026-02-27 23:05:55
综合导航
成功
标题:艾滋病潜伏期多久 - 云大夫
简介:感染人类免疫缺陷病毒后分为三个时期,急性感染期、无症状期和艾滋病期。急性感染期一般持续两到三周,可出现流感样症状,然后进
-
2026-03-01 08:47:30
教育培训
成功
标题:那次玩得作文300字3篇
简介:在平凡的学习、工作、生活中,大家都写过作文吧,作文是人们以书面形式表情达意的言语活动。相信许多人会觉得作文很难写吧,下面
-
2026-03-01 00:33:44
教育培训
成功
标题:小学二年级作文(经典5篇)
简介:在现实生活或工作学习中,大家都写过作文吧,作文是由文字组成,经过人的思想考虑,通过语言组织来表达一个主题意义的文体。那么
-
2026-03-01 00:23:06
综合导航
成功
标题:ZPE.COM eNaming - Domain brokers
简介:Establish company, product, or service dominance Expand Mark
-
2026-02-28 10:12:07
综合导航
成功
标题:In Pursuit Of The Sublime
简介:1x.com is the world
-
2026-02-27 23:28:22
综合导航
成功
标题:Working girl : 4 tendances mode à adopter au boulot
简介:Découvrez nos conseils mode pour adopter les tendances print
-
2026-03-01 08:31:02
教育培训
成功
标题:小学三年级优秀作文(优秀)
简介:无论在学习、工作或是生活中,大家都不可避免地会接触到作文吧,作文是由文字组成,经过人的思想考虑,通过语言组织来表达一个主