Skip to content

Commit

Permalink
feat: update docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadch91 committed Dec 9, 2024
1 parent 4d7dac3 commit 93f3e6d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ Also If you want you can install additional tools or libraries.
```dockerfile
# Do not change the code below
# Run The Sender Go Application
FROM golang:1.23-alpine AS final
FROM golang:1.23-alpine
# Copy the source code
COPY . .
# Download the dependencies
RUN go mod download
RUN cd sender && go mod download -x
# Build the Go application
RUN go build -o sender .
ENTRYPOINT ["/sender"]
RUN cd sender && go build -o task .

ENTRYPOINT ["./sender/task"]
```

We use [Dockerfile](./Dockerfile) for Building Image.
Expand Down
7 changes: 4 additions & 3 deletions sender/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ FROM golang:1.23-alpine
# Copy the source code
COPY . .
# Download the dependencies
RUN go mod download
RUN cd sender && go mod download -x
# Build the Go application
RUN go build -o sender .
ENTRYPOINT ["/sender"]
RUN cd sender && go build -o task .

ENTRYPOINT ["./sender/task"]

0 comments on commit 93f3e6d

Please sign in to comment.