Streamixph05 commited on
Commit
1b35d30
·
verified ·
1 Parent(s): ae97c13

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -14
Dockerfile CHANGED
@@ -1,26 +1,21 @@
1
- # Gumamit ng Go base image para i-build ang Go program
2
  FROM golang:1.21-alpine
3
 
4
- # I-install ang git kung kailangan pa rin
5
  RUN apk add --no-cache git
6
 
7
  # I-set ang working directory
8
  WORKDIR /app
9
 
10
- # I-clone ang repository (gamitin ang branch na nasa Dockerfile mo, pero i-verify kung tama ito para sa Go version)
11
  RUN git clone -b python https://github.com/EverythingSuckz/TG-FileStreamBot.git .
12
 
13
- # Gawin ang build process para sa Go
14
- # Kailangan mong i-verify ang path kung saan ang main Go source file,
15
- # pero base sa structure ng repo, malamang ganito ang magiging build step:
16
- # Lumipat sa directory kung nasaan ang Go source code (malabong WebStreamer ang folder name, pero base sa CMD mo dati, subukan natin)
17
- WORKDIR /app/WebStreamer
18
-
19
- # Ngayon, i-download ang modules
20
  RUN go mod download
21
 
22
- # I-build ang application (ang output executable ay ilalagay natin sa /app)
23
- RUN go build -o /app/WebStreamer .
 
24
 
25
- # Bumalik sa root directory para sa final CMD
26
- WORKDIR /app
 
 
1
  FROM golang:1.21-alpine
2
 
3
+ # I-install ang git
4
  RUN apk add --no-cache git
5
 
6
  # I-set ang working directory
7
  WORKDIR /app
8
 
9
+ # I-clone ang repository sa /app (dahil may dot '.' sa dulo)
10
  RUN git clone -b python https://github.com/EverythingSuckz/TG-FileStreamBot.git .
11
 
12
+ # DAPAT AY NASA /app ANG go.mod file dahil sa pag-clone gamit ang '.'
13
+ # I-download ang modules sa /app directory
 
 
 
 
 
14
  RUN go mod download
15
 
16
+ # I-build ang Go program. Base sa iyong dating CMD, malamang ang main executable ay nasa loob ng WebStreamer folder.
17
+ # Kailangan mong i-build ang main package, na kadalasan ay nasa root o sa specific folder tulad ng "WebStreamer"
18
+ RUN go build -o WebStreamer ./WebStreamer/
19
 
20
+ # Final Command: Patakbuhin ang na-build na file (na nasa /app/WebStreamer)
21
+ CMD ["./WebStreamer/WebStreamer"]