- 创建Dockerfile
FROM denoland/deno:alpine-1.26.0
WORKDIR /app
COPY . /app
EXPOSE 8000
RUN deno cache main.ts
CMD [ "run", "--allow-all", "main.ts" ]
- .dockerignore 忽略相应的文件
.dockerignore
Dockerfile
.vscode/
.gitlab-ci.yml
README.md
.git/
- 本地打包测试,若无问题再写gitlab
#docker build -t hellocat .
- 编写.gitlab-ci.ym