forked from secretflow/scql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scql-ubuntu.Dockerfile
49 lines (37 loc) · 1.35 KB
/
scql-ubuntu.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM ubuntu:jammy as base
ARG TARGETPLATFORM
ENV TZ=Asia/Shanghai
RUN apt update \
&& apt upgrade -y \
&& apt install -y libgomp1 \
&& apt install -y curl iputils-ping \
&& apt clean
COPY ./$TARGETPLATFORM/scqlengine /home/admin/bin/scqlengine
COPY ./$TARGETPLATFORM/scdbserver /home/admin/bin/scdbserver
COPY ./$TARGETPLATFORM/scdbclient /home/admin/bin/scdbclient
COPY ./$TARGETPLATFORM/broker /home/admin/bin/broker
COPY ./$TARGETPLATFORM/brokerctl /home/admin/bin/brokerctl
COPY ./scripts/kuscia-templates /home/admin/scripts/kuscia-templates
FROM base as image-dev
ARG GO_VERSION=1.21.5
RUN apt install -y wget iproute2
# install go
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] ; \
then \
GO_ARCH=arm64 && \
GO_SHA256SUM=841cced7ecda9b2014f139f5bab5ae31785f35399f236b8b3e75dff2a2978d96 ; \
else \
GO_ARCH=amd64 && \
GO_SHA256SUM=e2bc0b3e4b64111ec117295c088bde5f00eeed1567999ff77bc859d7df70078e ; \
fi \
&& url="https://go.dev/dl/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz"; \
wget --no-check-certificate -O go.tgz "$url"; \
echo "${GO_SHA256SUM} *go.tgz" | sha256sum -c -; \
tar -C /usr/local -xzf go.tgz; \
rm go.tgz;
ENV PATH="/usr/local/go/bin:${PATH}"
# install dlv
RUN go install github.com/go-delve/delve/cmd/dlv@latest
# Add GOPATH to PATH
ENV PATH="${PATH}:/root/go/bin"
FROM base as image-prod