Skip to content

Commit

Permalink
feat: 打包 docker 镜像
Browse files Browse the repository at this point in the history
  • Loading branch information
ikxin committed Jun 27, 2023
1 parent c5f7b6f commit 2678b18
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/kms-tools-bun/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ubuntu:latest as build

RUN apt update && apt install -y curl unzip && curl -fsSL https://bun.sh/install | bash

FROM ubuntu:latest

COPY --from=build /root/.bun/bin/bun /usr/local/bin
COPY . /root/web

RUN cd /root/web && bun install

EXPOSE 8080

WORKDIR /root/web

CMD [ "bun", "run", "src/index.ts" ]
2 changes: 2 additions & 0 deletions packages/kms-tools-bun/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ server.post('/api/check-kms', async context => {
})

server.listen(8080)

console.log(`🦊 Elysia is running at ${server.server.hostname}:${server.server.port}`)

0 comments on commit 2678b18

Please sign in to comment.