diff --git a/Dockerfile b/Dockerfile index 65b3658..d035f04 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] \ No newline at end of file +CMD ["./sorobix-formatter"] \ No newline at end of file diff --git a/Makefile b/Makefile index cc80b2c..bd88f0b 100644 --- a/Makefile +++ b/Makefile @@ -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" diff --git a/bin/sorobix-formatter b/bin/sorobix-formatter index 8dd11ab..432f900 100755 Binary files a/bin/sorobix-formatter and b/bin/sorobix-formatter differ