Ashad001 commited on
Commit
c8e5adf
·
verified ·
1 Parent(s): 70ae4ca

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -3
Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
  # Use the official Go image to create a build artifact
2
- FROM golang:1.22.3 AS builder
3
 
4
  # Set the Current Working Directory inside the container
5
  WORKDIR /app
@@ -14,7 +14,7 @@ RUN go mod download
14
  COPY . .
15
 
16
  # Build the Go app
17
- RUN go build -o main .
18
 
19
  # Debug step: list the contents of the /app directory
20
  RUN ls -al /app
@@ -44,4 +44,4 @@ RUN ls -al /root
44
  EXPOSE 8080
45
 
46
  # Command to run the executable
47
- CMD ["./main"]
 
1
  # Use the official Go image to create a build artifact
2
+ FROM golang:1.18 AS builder
3
 
4
  # Set the Current Working Directory inside the container
5
  WORKDIR /app
 
14
  COPY . .
15
 
16
  # Build the Go app
17
+ RUN go build -o main main.go
18
 
19
  # Debug step: list the contents of the /app directory
20
  RUN ls -al /app
 
44
  EXPOSE 8080
45
 
46
  # Command to run the executable
47
+ CMD ./main