Skip to content

Commit

Permalink
feat: Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Hemanth Krishna <[email protected]>
  • Loading branch information
DarthBenro008 committed Mar 7, 2023
1 parent c0cd460 commit 23eeaa4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
FROM golang:1.19
FROM golang:1.19 as builder
WORKDIR /go/src/app
COPY . .
RUN make build

FROM rust:alpine
RUN rustup component add rustfmt
COPY --from=builder /go/src/app/bin/sorobix-formatter ./
EXPOSE 3000
CMD ["./bin/sorobix-formatter"]
CMD ["./sorobix-formatter"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ deps:
.PHONY: build
build: deps
@echo "> Building Binary"
go build ${LDFLAGS} -o ${BUILD_DIR}/${PROJECT_NAME}
CGO_ENABLED=0 go build ${LDFLAGS} -o ${BUILD_DIR}/${PROJECT_NAME}
@echo "> Binary has been built successfully"


Expand Down
Binary file modified bin/sorobix-formatter
Binary file not shown.

0 comments on commit 23eeaa4

Please sign in to comment.