Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +7 -15
Dockerfile
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
# Gumamit ng Go base image
|
| 2 |
FROM golang:1.21-alpine
|
| 3 |
|
| 4 |
# I-install ang git
|
|
@@ -7,22 +6,15 @@ RUN apk add --no-cache git
|
|
| 7 |
# I-set ang working directory
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
-
# I-clone ang repository.
|
| 11 |
-
RUN git clone https://github.com/EverythingSuckz/TG-FileStreamBot.git
|
| 12 |
-
# Note: Huwag na gamitin ang -b python branch kung hindi mo sigurado, gamitin ang default branch.
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
# Dito mo dapat makita ang go.mod
|
| 18 |
RUN go mod download
|
| 19 |
|
| 20 |
-
# I-build ang application. Ang
|
| 21 |
-
|
| 22 |
-
RUN go build -o /app/WebStreamer ./WebStreamer/
|
| 23 |
-
|
| 24 |
-
# Bumalik sa root directory para sa final CMD
|
| 25 |
-
WORKDIR /app
|
| 26 |
|
| 27 |
-
# Patakbuhin ang na-build na executable
|
| 28 |
CMD ["./WebStreamer"]
|
|
|
|
|
|
|
| 1 |
FROM golang:1.21-alpine
|
| 2 |
|
| 3 |
# I-install ang git
|
|
|
|
| 6 |
# I-set ang working directory
|
| 7 |
WORKDIR /app
|
| 8 |
|
| 9 |
+
# I-clone ang repository sa /app. Gamit ang '.' para sa current directory.
|
| 10 |
+
RUN git clone -b python https://github.com/EverythingSuckz/TG-FileStreamBot.git .
|
|
|
|
| 11 |
|
| 12 |
+
# 1. I-download ang modules, ipinapasa ang --mod=mod (Optionally mas malinaw, pero subukan mo muna wala)
|
| 13 |
+
# Kung mag-error pa rin, subukan mong tanggalin ang -C at idagdag ang -mod=mod
|
|
|
|
|
|
|
| 14 |
RUN go mod download
|
| 15 |
|
| 16 |
+
# 2. I-build ang Go application. Ang main source code ay nasa WebStreamer/
|
| 17 |
+
RUN go build -o WebStreamer ./WebStreamer/
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
# 3. Patakbuhin ang na-build na executable
|
| 20 |
CMD ["./WebStreamer"]
|