-
Notifications
You must be signed in to change notification settings - Fork 18
/
Dockerfile
27 lines (21 loc) · 897 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# This dockerfile is used to run unit tests.
FROM golang:1.20.1
# install redis
RUN git clone -b 5.0 --depth 1 https://github.com/antirez/redis.git
RUN cd redis && make -j install
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
RUN cd / && git clone https://github.com/RedisLabsModules/redistimeseries.git /redistimeseries
COPY . $GOPATH/src/github.com/RedisLabs/redis-timeseries-go
WORKDIR $GOPATH/src/github.com/RedisLabs/redis-timeseries-go
RUN dep ensure -v
# install redis-timeseries
RUN cd /redistimeseries && \
git submodule init && \
git submodule update && \
git pull --recurse-submodules && \
cd src && \
make -j all
CMD redis-server --daemonize yes --loadmodule /redistimeseries/src/redistimeseries.so --requirepass SUPERSECRET && \
sleep 1 && \
go test -coverprofile=coverage.out && \
go tool cover -func=coverage.out