Shopify / ghostferry

The swiss army knife of live data migrations
https://shopify.github.io/ghostferry
MIT License
748 stars 70 forks source link

Does ghostferry have Docker images? #221

Closed fighterleslie closed 3 years ago

fighterleslie commented 3 years ago

Does ghostferry or ghostferry-copydb have official Docker images?

shuhaowu commented 3 years ago

No, but it should be relatively easy to build one. Something like:

FROM golang:1.14.8-buster AS builder

ARG GHOSTFERRY_REVISION
ENV GHOSTFERRY_REVISION ${GHOSTFERRY_REVISION:-master}

RUN set -xe; \
    cd /tmp; \
    git clone --depth=1 --branch ${GHOSTFERRY_REVISION} https://github.com/Shopify/ghostferry.git; \
    cd ghostferry; \
    make copydb; \
    make sharding

FROM ubuntu:focal

COPY --from=builder /go/bin /app/ghostferry
COPY --from=builder /tmp/ghostferry/webui /app/ghostferry/webui

# Set the pwd so the web UI works
WORKDIR /app/ghostferry

Because Ghostferry is very customizable due to its nature as a library and features like HTTP Callback, you can build very elaborate container setups with a lot more features, which is what we've done internally. However, that setup is a bit too custom for our purposes to be open sourced for now.

fighterleslie commented 3 years ago

Got it. Thanks.