Skip to content

Commit

Permalink
K8SPXC-1263 fix orchestrator pxc5.7 and pxc8.0 images (#898)
Browse files Browse the repository at this point in the history
  • Loading branch information
hors authored Jan 4, 2024
1 parent d6495bf commit ffd75d9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 26 deletions.
10 changes: 4 additions & 6 deletions percona-xtradb-cluster-5.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM golang:1.21 AS go_builder
WORKDIR /go/src/github.com/percona/percona-xtradb-cluster-operator/src

RUN export GO111MODULE=off; \
go get k8s.io/apimachinery/pkg/util/sets; \
curl -Lf -o /go/src/github.com/percona/percona-xtradb-cluster-operator/src/peer-list.go https://raw.githubusercontent.com/percona/percona-xtradb-cluster-operator/main/cmd/peer-list/main.go; \
go build peer-list.go
RUN git clone --branch=main https://github.com/percona/percona-xtradb-cluster-operator.git /go/src/github.com/percona/percona-xtradb-cluster-operator/
WORKDIR /go/src/github.com/percona/percona-xtradb-cluster-operator/cmd/peer-list
RUN go build

FROM redhat/ubi8-minimal

Expand Down Expand Up @@ -110,7 +108,7 @@ RUN cp /usr/share/doc/percona-xtradb-cluster-galera/COPYING /licenses/LICENSE.ga
cp /usr/share/doc/percona-xtradb-cluster-galera/LICENSE.* /licenses/

COPY dockerdir /
COPY --from=go_builder /go/src/github.com/percona/percona-xtradb-cluster-operator/src/peer-list /usr/bin/
COPY --from=go_builder /go/src/github.com/percona/percona-xtradb-cluster-operator/cmd/peer-list /usr/bin/

RUN set -ex; \
rm -rf /etc/my.cnf.d; \
Expand Down
10 changes: 4 additions & 6 deletions percona-xtradb-cluster-5.7/Dockerfile.k8s
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM golang:1.21 AS go_builder
WORKDIR /go/src/github.com/percona/percona-xtradb-cluster-operator/src

RUN export GO111MODULE=off; \
go get k8s.io/apimachinery/pkg/util/sets; \
curl -Lf -o /go/src/github.com/percona/percona-xtradb-cluster-operator/src/peer-list.go https://raw.githubusercontent.com/percona/percona-xtradb-cluster-operator/main/cmd/peer-list/main.go; \
go build peer-list.go
RUN git clone --branch=main https://github.com/percona/percona-xtradb-cluster-operator.git /go/src/github.com/percona/percona-xtradb-cluster-operator/
WORKDIR /go/src/github.com/percona/percona-xtradb-cluster-operator/cmd/peer-list
RUN go build

FROM redhat/ubi8-minimal

Expand Down Expand Up @@ -127,7 +125,7 @@ RUN cp /usr/share/doc/percona-xtradb-cluster-galera/COPYING /licenses/LICENSE.ga
cp /usr/share/doc/percona-xtradb-cluster-galera/LICENSE.* /licenses/

COPY dockerdir /
COPY --from=go_builder /go/src/github.com/percona/percona-xtradb-cluster-operator/src/peer-list /usr/bin/
COPY --from=go_builder /go/src/github.com/percona/percona-xtradb-cluster-operator/cmd/peer-list /usr/bin/

RUN rmdir /etc/my.cnf.d; \
ln -s /etc/mysql/conf.d /etc/my.cnf.d; \
Expand Down
12 changes: 5 additions & 7 deletions percona-xtradb-cluster-8.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM golang:1.19 AS go_builder
WORKDIR /go/src/github.com/percona/percona-xtradb-cluster-operator/src
FROM golang:1.21 AS go_builder

RUN export GO111MODULE=off; \
go get k8s.io/apimachinery/pkg/util/sets; \
curl -Lf -o /go/src/github.com/percona/percona-xtradb-cluster-operator/src/peer-list.go https://raw.githubusercontent.com/percona/percona-xtradb-cluster-operator/main/cmd/peer-list/main.go; \
go build peer-list.go
RUN git clone --branch=main https://github.com/percona/percona-xtradb-cluster-operator.git /go/src/github.com/percona/percona-xtradb-cluster-operator/
WORKDIR /go/src/github.com/percona/percona-xtradb-cluster-operator/cmd/peer-list
RUN go build

FROM redhat/ubi8-minimal

Expand Down Expand Up @@ -104,7 +102,7 @@ RUN cp /usr/share/doc/percona-xtradb-cluster-galera/COPYING /licenses/LICENSE.ga
cp /usr/share/doc/percona-xtradb-cluster-galera/LICENSE.* /licenses/

COPY dockerdir /
COPY --from=go_builder /go/src/github.com/percona/percona-xtradb-cluster-operator/src/peer-list /usr/bin/
COPY --from=go_builder /go/src/github.com/percona/percona-xtradb-cluster-operator/cmd/peer-list /usr/bin/

RUN set -ex; \
rmdir /etc/my.cnf.d; \
Expand Down
12 changes: 5 additions & 7 deletions percona-xtradb-cluster-8.0/Dockerfile.k8s
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM golang:1.19 AS go_builder
WORKDIR /go/src/github.com/percona/percona-xtradb-cluster-operator/src
FROM golang:1.21 AS go_builder

RUN export GO111MODULE=off; \
go get k8s.io/apimachinery/pkg/util/sets; \
curl -Lf -o /go/src/github.com/percona/percona-xtradb-cluster-operator/src/peer-list.go https://raw.githubusercontent.com/percona/percona-xtradb-cluster-operator/main/cmd/peer-list/main.go; \
go build peer-list.go
RUN git clone --branch=main https://github.com/percona/percona-xtradb-cluster-operator.git /go/src/github.com/percona/percona-xtradb-cluster-operator/
WORKDIR /go/src/github.com/percona/percona-xtradb-cluster-operator/cmd/peer-list
RUN go build

FROM redhat/ubi8-minimal

Expand Down Expand Up @@ -113,7 +111,7 @@ RUN set -ex; \
echo '!includedir /etc/percona-xtradb-cluster.conf.d/' >> /etc/my.cnf

COPY dockerdir /
COPY --from=go_builder /go/src/github.com/percona/percona-xtradb-cluster-operator/src/peer-list /usr/bin/
COPY --from=go_builder /go/src/github.com/percona/percona-xtradb-cluster-operator/cmd/peer-list /usr/bin/
RUN mkdir -p /etc/mysql/conf.d/ /var/log/mysql /var/lib/mysql /docker-entrypoint-initdb.d /etc/percona-xtradb-cluster.conf.d; \
chown -R 1001:1001 /etc/mysql/ /var/log/mysql /var/lib/mysql /docker-entrypoint-initdb.d /etc/percona-xtradb-cluster.conf.d; \
chmod -R g=u /etc/mysql/ /var/log/mysql /var/lib/mysql /docker-entrypoint-initdb.d /etc/percona-xtradb-cluster.conf.d
Expand Down

0 comments on commit ffd75d9

Please sign in to comment.