Files
CephfsMig/dev/Dockerfile.native
Sebastian UnterschützandClaude Opus 5.5 8fe60a4f8f refactor!: rename module and move CLI to cmd/cephmig
Use the repository path git.zb-server.de/Sebi/CephfsMig as module
path instead of the non-importable name CephMig, and move the cephmig
entry point from the repository root to cmd/cephmig next to
cmd/nativeprobe. Makefile and Dockerfile.native build the new path.

BREAKING CHANGE: import paths change from CephMig/... to
git.zb-server.de/Sebi/CephfsMig/..., and the binary is now built from
./cmd/cephmig instead of the module root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:06:09 +01:00

21 lines
1012 B
Docker

ARG CEPH_IMAGE=quay.io/ceph/ceph:v21.2.0@sha256:c9e6ed4ac3fcf67b28f38358bb9619dee4d1dfb96ddd4b9b583eee316a15f04d
FROM ${CEPH_IMAGE} AS build
RUN dnf install -y gcc golang-1.26.10-1.el10_2 \
https://download.ceph.com/rpm-21.2.0/el10/x86_64/libcephfs-devel-21.2.0-0.el10.x86_64.rpm \
https://download.ceph.com/rpm-21.2.0/el10/x86_64/libcephfs-proxy2-21.2.0-0.el10.x86_64.rpm \
https://download.ceph.com/rpm-21.2.0/el10/x86_64/librados-devel-21.2.0-0.el10.x86_64.rpm \
&& dnf clean all
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build \
CGO_ENABLED=1 go test -race -tags ceph ./... \
&& CGO_ENABLED=1 go vet -tags ceph ./... \
&& CGO_ENABLED=1 go build -buildvcs=false -tags ceph -o /out/native-probe ./cmd/nativeprobe \
&& CGO_ENABLED=1 go build -buildvcs=false -tags ceph -o /out/cephmig-native ./cmd/cephmig
FROM ${CEPH_IMAGE}
COPY --from=build /out/ /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/cephmig-native"]