1+ # Copyright (C) 2019-2022 Zilliz. All rights reserved.
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
4+ # with the License. You may obtain a copy of the License at
5+ #
6+ # http://www.apache.org/licenses/LICENSE-2.0
7+ #
8+ # Unless required by applicable law or agreed to in writing, software distributed under the License
9+ # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
10+ # or implied. See the License for the specific language governing permissions and limitations under the License.
11+
12+ FROM milvusdb/openblas:ubuntu20.04-20220825-4feedf1
13+
14+ RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-certificates gnupg2 && \
15+ wget -qO- "https://cmake.org/files/v3.18/cmake-3.18.6-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local && \
16+ apt-get update && apt-get install -y --no-install-recommends \
17+ g++ gcc gfortran git make ccache libssl-dev zlib1g-dev libboost-regex-dev libboost-program-options-dev libboost-system-dev \
18+ libboost-filesystem-dev libboost-serialization-dev python3-dev libboost-python-dev libcurl4-openssl-dev libtbb-dev clang-format-10 clang-tidy-10 lcov libtool m4 autoconf automake && \
19+ apt-get remove --purge -y && \
20+ rm -rf /var/lib/apt/lists/*
21+
22+ RUN apt-get update && apt-get install -y --no-install-recommends libzstd-dev
23+
24+ # Install Go
25+ ENV GOPATH /go
26+ ENV GOROOT /usr/local/go
27+ ENV GO111MODULE on
28+ ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
29+ RUN mkdir -p /usr/local/go && wget -qO- "https://golang.org/dl/go1.18.3.linux-amd64.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
30+ mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
31+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${GOPATH}/bin v1.46.2 && \
32+ # export GO111MODULE=on && go get github.com/quasilyte/go-ruleguard/cmd/[email protected] && \ 33+ go install github.com/ramya-rao-a/go-outline@latest && \
34+ go install golang.org/x/tools/gopls@latest && \
35+ go install github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest && \
36+ go install github.com/go-delve/delve/cmd/dlv@latest && \
37+ go install honnef.co/go/tools/cmd/
[email protected] && \
38+ go clean --modcache && \
39+ chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
40+
41+ RUN ln -s /go/bin/dlv /go/bin/dlv-dap
42+
43+ RUN apt-get update && apt-get install -y --no-install-recommends \
44+ gdb gdbserver && \
45+ apt-get remove --purge -y && \
46+ rm -rf /var/lib/apt/lists/*
47+
48+ RUN echo 'root:root' | chpasswd
49+
50+ # refer: https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild
51+ RUN mkdir -p /home/milvus/.vscode-server/extensions \
52+ /home/milvus/.vscode-server-insiders/extensions \
53+ && chmod -R 777 /home/milvus
54+
55+ COPY --chown=0:0 build/docker/builder/entrypoint.sh /
56+
57+ RUN wget -qO- "https://github.com/jeffoverflow/autouseradd/releases/download/1.2.0/autouseradd-1.2.0-amd64.tar.gz" | tar xz -C / --strip-components 1
58+
59+ RUN wget -O /tini https://github.com/krallin/tini/releases/download/v0.19.0/tini && \
60+ chmod +x /tini
61+
62+ ENTRYPOINT [ "/tini" , "--" , "autouseradd" , "--user" , "milvus" , "--" , "/entrypoint.sh" ]
63+ CMD ["tail" , "-f" , "/dev/null" ]
0 commit comments