Skip to content

Commit

Permalink
fix(container): Re-write aerospike benchmark dockerfile to use two st…
Browse files Browse the repository at this point in the history
…age build process (#102)
  • Loading branch information
jsirianni authored Oct 24, 2023
1 parent 73baff6 commit 7b4a133
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions container/aerospike-benchmark/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
FROM alpine:3.18

# Build the Aerospike benchmark binary
RUN apk add go git && \
git clone https://github.com/aerospike/aerospike-client-go.git && \
cd aerospike-client-go/tools/benchmark && \
go build . && \
mv benchmark /etc && \
rm -rf /aerospike-client-go && \
apk del go git
FROM golang:1.21.3-alpine3.18 as build
WORKDIR /
RUN apk add curl unzip
RUN \
curl -sL \
-o aerospike.zip \
https://github.com/aerospike/aerospike-client-go/archive/refs/tags/v6.13.0.zip
WORKDIR /app
RUN unzip /aerospike.zip
WORKDIR /app/aerospike-client-go-6.13.0/tools/benchmark
RUN go build .
RUN mv benchmark /

ENTRYPOINT [ "/etc/benchmark" ]
FROM alpine:3.18
COPY --from=build /benchmark /benchmark
ENTRYPOINT [ "/benchmark" ]

0 comments on commit 7b4a133

Please sign in to comment.