-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile.kvdb
38 lines (30 loc) · 1.63 KB
/
Dockerfile.kvdb
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
28
29
30
31
32
33
34
35
36
37
38
FROM ubuntu
LABEL [email protected]
RUN apt-get update -yq
RUN apt-get install -yq --no-install-recommends \
gcc \
g++ \
ca-certificates && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN apt-get update && \
apt-get -y install unzip curl make git default-jre
RUN curl -s -L https://dl.google.com/go/go1.20.5.linux-amd64.tar.gz | tar -C /usr/local/ -xz && \
curl -s -L https://github.com/etcd-io/etcd/releases/download/v3.4.24/etcd-v3.4.24-linux-amd64.tar.gz -o /tmp/etcd-v3.4.24-linux-amd64.tar.gz && \
mkdir -p /tmp/test-etcd && tar xzvf /tmp/etcd-v3.4.24-linux-amd64.tar.gz -C /tmp/test-etcd --strip-components=1 && cp /tmp/test-etcd/etcd /usr/local/bin && \
curl -s -L https://releases.hashicorp.com/consul/1.0.0/consul_1.0.0_linux_amd64.zip -o /tmp/consul.zip && \
mkdir -p /tmp/test-consul && unzip /tmp/consul.zip -d /tmp/test-consul && cp /tmp/test-consul/consul /usr/local/bin/ && \
curl -s -L https://archive.apache.org/dist/zookeeper/zookeeper-3.4.13/zookeeper-3.4.13.tar.gz -o /tmp/zookeeper-3.4.13.tar.gz && \
mkdir -p /tmp/test-zookeeper && tar -xvf /tmp/zookeeper-3.4.13.tar.gz -C /tmp/test-zookeeper --strip-components=1 && mkdir -p /data/zookeeper
ENV PATH /usr/local/go/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
ENV GOPATH /go
ENV GOROOT /usr/local/go
RUN mkdir -p /go/src/github.com/portworx/kvdb
ADD . /go/src/github.com/portworx/kvdb
RUN echo $'tickTime=2000 \n\
dataDir=/data/zookeeper \n\
clientPort=2181 \n\
initLimit=5 \n\
syncLimit=2 \n\
server.1=127.0.0.1:2888:3888' > /tmp/test-zookeeper/conf/zoo.cfg
WORKDIR /go/src/github.com/portworx/kvdb