forked from mydumper/mydumper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (28 loc) · 1.1 KB
/
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
# Using Debian's GCC image, pinned to latest LTS, scheduled to EOL on Jun'26.
FROM mydumper/mydumper-builder-el9:latest as builder
# Docker build arguments. Use to customize build.
# Example to enable ZSTD:
# $ docker build ---build-arg CMAKE_ARGS='-DWITH_ZSTD=ON' mydumper .
ARG PERCONA_COMPONENT
ARG CMAKE_ARGS
ARG DEBIAN_FRONTEND=noninteractive
RUN \
yum -y install https://repo.mysql.com/mysql80-community-release-el9.rpm
RUN \
yum -y install mysql-community-libs mysql-community-devel
COPY . /usr/src/
WORKDIR /usr/src/
RUN \
cmake ${CMAKE_ARGS} . && \
make && \
make install
FROM mydumper/mydumper-builder-el9:latest
ARG DEBIAN_FRONTEND=noninteractive
RUN \
yum -y install https://repo.mysql.com/mysql80-community-release-el9.rpm
RUN \
yum -y install mysql-community-libs
COPY --from=builder /usr/local/bin /usr/local/bin
COPY --from=builder /etc/mydumper.cnf /etc/
# Compilation outputs both mydumper and myloader binaries.
CMD [ "bash", "-c", "echo 'This Docker image contains both mydumper and myloader binaries. Run the container by invoking either mydumper or myloader as first argument.'" ]