-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install linux generic libc2.12 mysqlbinlog
binary and libraries
#15854
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,13 +18,20 @@ | |
|
||
# Use a temporary layer for the build stage. | ||
ARG bootstrap_version=31 | ||
ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" | ||
ARG image="vitess/bootstrap:${bootstrap_version}-common" | ||
|
||
FROM "${image}" AS builder | ||
|
||
# Allows docker builds to set the BUILD_NUMBER | ||
ARG BUILD_NUMBER | ||
|
||
# Download linux generic mysql | ||
USER root | ||
RUN apt-get update && apt-get install -y xz-utils | ||
RUN wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.37-linux-glibc2.12-x86_64.tar.xz | ||
RUN tar -xf mysql-8.0.37-linux-glibc2.12-x86_64.tar.xz | ||
RUN mv mysql-8.0.37-linux-glibc2.12-x86_64 mysql-generic-binaries | ||
|
||
# Re-copy sources from working tree. | ||
COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess | ||
|
||
|
@@ -34,13 +41,10 @@ USER vitess | |
RUN make install PREFIX=/vt/install | ||
|
||
# Start over and build the final image. | ||
FROM debian:bullseye-slim | ||
|
||
# Install mysqlbinglog | ||
RUN apt-get update && apt-get -y install libssl1.1 gnupg | ||
COPY --from=builder /usr/bin/mysqlbinlog /usr/bin/mysqlbinlog | ||
FROM --platform=linux/amd64 debian:bullseye-slim | ||
|
||
# Install xtrabackup | ||
RUN apt-get update && apt-get -y install gnupg | ||
RUN apt-key adv --no-tty --keyserver keyserver.ubuntu.com --recv-keys 9334A25F8507EFA5 | ||
RUN echo 'deb http://repo.percona.com/apt bullseye main' > /etc/apt/sources.list.d/percona.list | ||
RUN apt-get update -y | ||
|
@@ -51,16 +55,19 @@ RUN groupadd -r vitess && useradd -r -g vitess vitess | |
RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt | ||
|
||
# Set up Vitess environment (just enough to run pre-built Go binaries) | ||
ENV VTROOT /vt/src/vitess.io/vitess | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only use was for the |
||
ENV VTDATAROOT /vt/vtdataroot | ||
ENV VTROOT /vt | ||
ENV VTDATAROOT $VTROOT/vtdataroot | ||
ENV PATH $VTROOT/bin:$PATH | ||
|
||
# Copy artifacts from builder layer. | ||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
COPY --from=builder --chown=vitess:vitess /vt/install /vt | ||
COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/vtadmin /vt/web/vtadmin | ||
COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/config/init_db.sql /vt/config/ | ||
COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/config/mycnf /vt/config/ | ||
COPY --from=builder --chown=vitess:vitess /vt/install $VTROOT | ||
COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/vtadmin $VTROOT/web/vtadmin | ||
COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/config/init_db.sql $VTROOT/config/ | ||
COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/config/mycnf $VTROOT/config/ | ||
COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/mysql-generic-binaries/bin/mysqlbinlog $VTROOT/bin/mysqlbinlog | ||
COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/mysql-generic-binaries/lib/private/libcrypto.so.3 $VTROOT/lib/private/libcrypto.so.3 | ||
COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/mysql-generic-binaries/lib/private/libssl.so.3 $VTROOT/lib/private/libssl.so.3 | ||
Comment on lines
+69
to
+70
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copying the two libraries needed by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @frouioui This assumes we use always OpenSSL 3, which is not something we could assume yet I think? I don't think we can copy it like this tbh, those libraries themselves also then have dependencies and we suddenly would be responsible here for security issues in those versions and have to manage that? Which is a big pain since they are not versioned with |
||
|
||
# Create mount point for actual data (e.g. MySQL data dir) | ||
VOLUME /vt/vtdataroot | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was reverted back to
common
as we no longer need to copymysqlbinlog
from the bootstrap image.