mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Upgrade Go to 1.19 * Use go install to install statik for CI/CD * Switch from stretch to buster for idk The stretch release doesn't exist anymore for go 1.19 docker images. buster is a newer version of Debian anyway (v10 vs v9) Co-authored-by: Fletcher Haynes <fletcher.haynes@molecula.com>
35 lines
1.3 KiB
Text
35 lines
1.3 KiB
Text
# This Dockerfile is used for cluster testing - it produces a much larger image
|
|
# and includes all of Go as well as some utilities.
|
|
|
|
FROM golang:1.19
|
|
|
|
LABEL maintainer "dev@pilosa.com"
|
|
|
|
COPY . /go/src/github.com/molecula/featurebase/
|
|
|
|
|
|
# download pumba for fault injection
|
|
ADD https://github.com/alexei-led/pumba/releases/download/0.6.0/pumba_linux_amd64 /pumba
|
|
RUN chmod +x /pumba
|
|
|
|
# add docker client to pause/unpause nodes
|
|
RUN apt update
|
|
RUN apt install -y docker.io
|
|
|
|
# add docker-compose so tests can use it for stuff
|
|
ADD https://github.com/docker/compose/releases/latest/download/docker-compose-Linux-x86_64 /usr/local/bin/docker-compose
|
|
RUN chmod +x /usr/local/bin/docker-compose
|
|
|
|
# generate an instrumented binary to allow for calculating code coverage for clustertests
|
|
# the entrypoint for the binary is TestRunMain, which is wrapper for main
|
|
RUN cd /go/src/github.com/molecula/featurebase/cmd/featurebase && \
|
|
go test -covermode=atomic -coverpkg=../../... -c -tags testrunmain -o featurebase && \
|
|
cp /go/src/github.com/molecula/featurebase/cmd/featurebase/featurebase /featurebase
|
|
|
|
COPY NOTICE /NOTICE
|
|
|
|
EXPOSE 10101
|
|
VOLUME /data
|
|
|
|
ENTRYPOINT ["bash", "-c"]
|
|
CMD ["/featurebase", "-test.run=TestRunMain", "-test.coverprofile=/results/coverage.out", "server", "--data-dir", "/data", "--bind", "http://0.0.0.0:10101"]
|