Initial aggregated API server (#15)

Add initial aggregated API server (squashed from a bunch of commits).

Signed-off-by: Andrew Keesler <akeesler@vmware.com>
Signed-off-by: Aram Price <pricear@vmware.com>
Signed-off-by: Ryan Richard <richardry@vmware.com>
This commit is contained in:
Mo Khan
2020-07-23 11:05:21 -04:00
committed by GitHub
parent 23c1b32a02
commit 5fdc20886d
14 changed files with 906 additions and 152 deletions

View File

@@ -25,8 +25,12 @@ WORKDIR /work
COPY go.mod .
COPY go.sum .
RUN go mod download
# Copy the source code
COPY . .
# Copy only the production source code to avoid cache misses when editing other files
COPY cmd ./cmd
COPY internal ./internal
COPY pkg ./pkg
COPY tools ./tools
COPY hack ./hack
# Build the executable binary
RUN GOOS=linux GOARCH=amd64 go build -ldflags "$(hack/get-ldflags.sh)" -o out ./...
@@ -37,6 +41,6 @@ WORKDIR /root/
# Copy the binary from the build-env stage
COPY --from=build-env /work/out/placeholder-name placeholder-name
# Document the port
EXPOSE 8080
EXPOSE 443
# Set the command
CMD ["./placeholder-name"]