-
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
Remove the bootstrap
dependency on the Docker images we ship
#16339
Changes from all commits
17e9453
7dcf64b
1ab2da3
0a4826e
aefb694
6c1158d
72d9cd5
af52626
c5ae3ee
e99c1a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,29 +12,26 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# NOTE: We have to build the Vitess binaries from scratch instead of sharing | ||
# a base image because Docker Hub dropped the feature we relied upon to | ||
# ensure images contain the right binaries. | ||
|
||
# Use a temporary layer for the build stage. | ||
ARG bootstrap_version=34 | ||
ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" | ||
|
||
FROM "${image}" AS builder | ||
FROM --platform=linux/amd64 golang:1.22.5-bullseye AS builder | ||
|
||
# Allows docker builds to set the BUILD_NUMBER | ||
ARG BUILD_NUMBER | ||
|
||
# Re-copy sources from working tree. | ||
COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess | ||
WORKDIR /vt/src/vitess.io/vitess | ||
|
||
# Build and install Vitess in a temporary output directory. | ||
# Create vitess user | ||
RUN groupadd -r vitess && useradd -r -g vitess vitess | ||
RUN mkdir -p /vt/vtdataroot /home/vitess | ||
RUN chown -R vitess:vitess /vt /home/vitess | ||
USER vitess | ||
|
||
# Re-copy sources from working tree. | ||
COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess | ||
|
||
RUN make install PREFIX=/vt/install | ||
|
||
# Start over and build the final image. | ||
FROM debian:bullseye-slim | ||
FROM --platform=linux/amd64 debian:bullseye-slim | ||
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. I have added these |
||
|
||
# Install dependencies | ||
COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh | ||
|
@@ -45,7 +42,7 @@ 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 | ||
ENV VTROOT /vt | ||
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. I believe this was wrong to begin with, leading to the error:
With this fix, the vitess binaries are directly in the 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. With the fix:
|
||
ENV VTDATAROOT /vt/vtdataroot | ||
ENV PATH $VTROOT/bin:$PATH | ||
|
||
|
This file was deleted.
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.
We only have
mysql80
, since a while.