-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added docker compose file and dockerfile
- Loading branch information
Showing
2 changed files
with
25 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM golang:1.20-alpine AS build-env | ||
|
||
# Install minimum necessary dependencies | ||
ENV PACKAGES curl make | ||
RUN apk add --no-cache $PACKAGES | ||
|
||
# Set working directory for the build | ||
WORKDIR /go/src/github.com/cosmos/rosetta | ||
|
||
# optimization: if go.sum didn't change, docker will use cached image | ||
COPY go.mod go.sum ./ | ||
|
||
RUN go mod download | ||
|
||
# Add source files | ||
COPY . . | ||
|
||
RUN make build | ||
|
||
EXPOSE 8080 | ||
|
||
# Run simd by default | ||
CMD ["./rosetta"] | ||
STOPSIGNAL SIGTERM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters