telegram-bot-api/Dockerfile
2025-04-24 10:11:12 +08:00

22 lines
677 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# sudo docker-compose up --build -d
# sudo docker build -t telegram-bot-api .
# sudo docker run -d --env-file .env --name telegram-bot-api telegram-bot-api
# sudo docker run -v /volume1/homes/JianMiau/www/certificate:/app/certificate -e TZ=Asia/Taipei --name=telegram-bot-api --restart always --net=host telegram-bot-api
# sudo docker-compose up -d --build
# 加上 --build 會幫你重建 image如程式有改動
# 基礎 Node 映像
FROM node:19.4.0
# 設定工作目錄
WORKDIR /app
# 複製 package 檔案並安裝依賴
COPY package*.json ./
RUN npm install
# 複製所有程式碼
COPY . .
# 預設啟動指令由 docker-compose 指定