-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile-mylet-8.0
35 lines (29 loc) · 1.14 KB
/
Dockerfile-mylet-8.0
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
ARG ARCH=amd64
FROM registry.erda.cloud/k4s/$ARCH/golang:1.17-buster AS builder
WORKDIR /workspace
COPY api/ api/
COPY controllers/ controllers/
COPY pkg/ pkg/
COPY cmd/ cmd/
COPY go.mod go.mod
COPY go.sum go.sum
RUN GOPROXY=https://goproxy.cn,direct CGO_ENABLED=0 GOOS=linux go build -a -o mylet ./cmd/mylet/
FROM registry.erda.cloud/k4s/$ARCH/mysql:8.0.30
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo Asia/Shanghai > /etc/timezone
RUN sed -i -r 's/(deb|security).debian.org/mirrors.163.com/g' /etc/apt/sources.list && \
apt-get update && \
#apt-get upgrade -y && \
apt-get install -y curl && \
curl -o /tmp/libprocps7.deb http://deb.debian.org/debian/pool/main/p/procps/libprocps7_3.3.15-2_amd64.deb && \
curl -o /tmp/xtrabackup.deb http://erda-project.oss-cn-hangzhou.aliyuncs.com/erda-addons/percona-xtrabackup-80_8.0.30-23-1.buster_$(uname -m).deb && \
apt-get install -y /tmp/libprocps7.deb /tmp/xtrabackup.deb && \
rm -f /tmp/libprocps7.deb /tmp/xtrabackup.deb && \
apt-get clean
WORKDIR /
COPY --from=builder /workspace/mylet .
VOLUME /mydir
EXPOSE 3306 33080
USER mysql:mysql
ENTRYPOINT []
CMD ["/mylet"]