File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5050 file : tools/docker/Dockerfile
5151 - name : http-gateway
5252 directory : http-gateway
53- file : tools/docker /Dockerfile
53+ file : http-gateway /Dockerfile
5454 - name : identity-store
5555 directory : identity-store
5656 file : tools/docker/Dockerfile
Original file line number Diff line number Diff line change 1+ FROM golang:1.16.4-alpine AS build
2+ RUN apk add --no-cache curl git build-base
3+ WORKDIR $GOPATH/src/github.com/plgd-dev/hub
4+ COPY go.mod go.sum ./
5+ RUN go mod download
6+ COPY . .
7+ WORKDIR $GOPATH/src/github.com/plgd-dev/hub/http-gateway
8+ RUN go build -o /go/bin/http-gateway ./cmd/service
9+
10+ FROM node:12 AS build-web
11+ COPY http-gateway/web /web
12+ RUN cd /web && npm install && npm run build
13+
14+ FROM alpine:3.14 as service
15+ RUN apk add --no-cache ca-certificates
16+ COPY --from=build-web /web/build /usr/local/var/www
17+ COPY --from=build /go/bin/http-gateway /usr/local/bin/http-gateway
18+ ENTRYPOINT [ "/usr/local/bin/http-gateway" ]
Original file line number Diff line number Diff line change @@ -8,12 +8,10 @@ default: build
88define build-docker-image
99 cd .. && docker build \
1010 --network=host \
11- --build-arg DIRECTORY=$(SERVICE_NAME ) \
12- --build-arg NAME=$(SERVICE_NAME ) \
1311 --tag plgd/$(SERVICE_NAME ) :$(VERSION_TAG ) \
1412 --tag plgd/$(SERVICE_NAME ) :$(LATEST_TAG ) \
1513 --target $(1 ) \
16- -f tools/docker /Dockerfile \
14+ -f $( SERVICE_NAME ) /Dockerfile \
1715 .
1816endef
1917
You can’t perform that action at this time.
0 commit comments