diff --git a/Makefile b/Makefile index 5c5cc4c..13c8568 100644 --- a/Makefile +++ b/Makefile @@ -98,9 +98,16 @@ install-go-lint: hadolint: docker run --rm -v $(pwd):/repo -i hadolint/hadolint:latest-alpine sh -c "cd /repo && hadolint -f json ./**/Dockerfile" > go-hadolint.json -gobuild: +gobuild-authentication: cd ms-authentication && \ cp -r *.json .. && \ cp ./res/configuration.toml ../res/configuration.toml && \ CGO_ENABLED=1 GOOS=linux go build -ldflags='-s -w' -a -installsuffix cgo main.go && \ cp main .. + +gobuild-ledger: + cd ms-ledger && \ + cp -r *.json .. && \ + cp ./res/configuration.toml ../res/configuration.toml && \ + CGO_ENABLED=1 GOOS=linux go build -ldflags='-s -w' -a -installsuffix cgo main.go && \ + cp main .. \ No newline at end of file diff --git a/ds-cv-inference/Dockerfile b/ds-cv-inference/Dockerfile index cc05ca5..b490147 100644 --- a/ds-cv-inference/Dockerfile +++ b/ds-cv-inference/Dockerfile @@ -24,10 +24,9 @@ RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" RUN apt-get update && apt-get install libgtk2.0-dev libgtk-3-dev libjpeg62 -y WORKDIR /go/src/ds-cv-inference -COPY go.* /go/src/ds-cv-inference/ -RUN go mod download - COPY . /go/src/ds-cv-inference +RUN go mod tidy +RUN go mod download RUN /bin/bash -c "source /opt/intel/openvino/setupvars.sh && echo building ds-cv-inference... && go build -o ds-cv-inference" && \ chmod +x entrypoint.sh diff --git a/ms-authentication/Dockerfile b/ms-authentication/Dockerfile index 21f7523..f06e9dd 100644 --- a/ms-authentication/Dockerfile +++ b/ms-authentication/Dockerfile @@ -21,7 +21,7 @@ WORKDIR /usr/local/bin/ms-authentication/ COPY . . # Compile the code -RUN make gobuild +RUN make gobuild-authentication # Next image - Copy built Go binary into new workspace FROM alpine diff --git a/ms-authentication/Makefile b/ms-authentication/Makefile index 7466942..c1b2351 100644 --- a/ms-authentication/Makefile +++ b/ms-authentication/Makefile @@ -18,7 +18,7 @@ docker: -t $(MICROSERVICE):dev \ . -gobuild: tidy +gobuild-authentication: tidy CGO_ENABLED=1 GOOS=linux go build -ldflags='-s -w' -a -installsuffix cgo main.go run: diff --git a/ms-ledger/Dockerfile b/ms-ledger/Dockerfile index 3aa7335..ee19c70 100644 --- a/ms-ledger/Dockerfile +++ b/ms-ledger/Dockerfile @@ -25,7 +25,7 @@ WORKDIR /usr/local/bin/ms-ledger/ COPY . . # Compile the code -RUN make gobuild +RUN make gobuild-ledger # Next image - Copy built Go binary into new workspace FROM alpine diff --git a/ms-ledger/Makefile b/ms-ledger/Makefile index 1b199ec..0464ed3 100644 --- a/ms-ledger/Makefile +++ b/ms-ledger/Makefile @@ -19,7 +19,7 @@ docker: -t $(MICROSERVICE):dev \ . -gobuild: tidy +gobuild-ledger: tidy CGO_ENABLED=1 GOOS=linux go build -ldflags='-s -w' -a -installsuffix cgo main.go run: