-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile-mylet-5.7
45 lines (36 loc) · 1.32 KB
/
Dockerfile-mylet-5.7
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
FROM registry.erda.cloud/erda-x/golang:1.17 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 CGO_ENABLED=0 go build -a -o mylet ./cmd/mylet/
FROM registry.erda.cloud/retag/amd64/mysql:5.7.38
LABEL org.opencontainers.image.authors="[email protected]"
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 locales vim net-tools && \
apt-get clean
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo Asia/Shanghai > /etc/timezone && \
echo zh_CN.GB18030 GB18030,zh_CN.GBK GBK,zh_CN.GB2312 GB2312 | tr , '\n' > /etc/locale.gen && \
# rubbish utf8
echo zh_CN.UTF-8 UTF-8,en_US.UTF-8 UTF-8 | tr , '\n' >> /etc/locale.gen && \
locale-gen && \
echo LANG=en_US.UTF-8 > /etc/locale.conf
ENV LANG=en_US.UTF-8
RUN apt-get install -y curl && \
curl -o /tmp/xtrabackup.deb http://erda-project.oss-cn-hangzhou.aliyuncs.com/erda-addons/percona-xtrabackup-24_2.4.26-1.buster_amd64.deb && \
apt-get install -y /tmp/xtrabackup.deb && \
rm -f /tmp/xtrabackup.deb && \
apt-get clean
WORKDIR /
COPY --from=builder /workspace/mylet .
VOLUME /mydir
EXPOSE 3306 33080
USER mysql:mysql
ENTRYPOINT []
CMD ["/mylet"]