Add Dockerfile

This commit is contained in:
u1wqelpw 2026-07-10 02:33:56 +00:00
commit e8f317a114
1 changed files with 23 additions and 0 deletions

23
Dockerfile Normal file
View File

@ -0,0 +1,23 @@
# Sử dụng base image Ubuntu làm nền tảng tương thích tốt với file thực thi linux-amd64
FROM ubuntu:22.04
# Cài đặt curl và ca-certificates để tải file qua HTTPS bảo mật
RUN apt-get update && apt-get install -y \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Thiết lập thư mục làm việc trong container
WORKDIR /app
# Tải xuống phiên bản stream-server mới nhất từ GitHub Releases
RUN curl -L -o stream-server https://github.com/perpetus/stream-server/releases/latest/download/stream-server-linux-amd64
# Cấp quyền thực thi cho file binary vừa tải về
RUN chmod +x stream-server
# Mở port 11470 theo yêu cầu của ứng dụng
EXPOSE 11470
# Lệnh khởi chạy ứng dụng khi container bắt đầu chạy
CMD ["./stream-server"]