Skip to content

Commit

Permalink
🐛 percona-toolkitをちゃんと入れる
Browse files Browse the repository at this point in the history
  • Loading branch information
ikura-hamu committed Sep 15, 2024
1 parent d92c7ba commit 6d2840f
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# --------------------------------------------------

FROM golang:alpine AS pprotein
FROM golang:1.23-alpine AS pprotein

RUN apk add npm make

Expand All @@ -11,27 +11,37 @@ RUN make build

# --------------------------------------------------

FROM golang:alpine AS alp
FROM golang:1.23-alpine AS alp

RUN go install github.com/tkuchiki/alp/cmd/alp@latest

# --------------------------------------------------

FROM golang:alpine AS slp
FROM golang:1.23-alpine AS slp

RUN apk add gcc musl-dev
RUN go install github.com/tkuchiki/slp/cmd/slp@latest

# --------------------------------------------------

FROM alpine as percona

RUN apk add --no-cache tar curl
RUN curl https://downloads.percona.com/downloads/percona-toolkit/3.6.0/binary/tarball/percona-toolkit-3.6.0_x86_64.tar.gz -o /tmp/percona-toolkit.tar.gz
RUN tar -xzf /tmp/percona-toolkit.tar.gz -C /tmp

# --------------------------------------------------

FROM alpine

RUN apk add --no-cache graphviz percona-toolkit
RUN apk add --no-cache graphviz \
perl # for pt-query-digest

COPY --from=pprotein /go/src/app/pprotein /usr/local/bin/
COPY --from=pprotein /go/src/app/pprotein-agent /usr/local/bin/
COPY --from=alp /go/bin/alp /usr/local/bin/
COPY --from=slp /go/bin/slp /usr/local/bin/
COPY --from=percona /tmp/percona-toolkit-3.6.0/bin/ /usr/local/bin/

RUN mkdir -p /opt/pprotein
WORKDIR /opt/pprotein
Expand Down

0 comments on commit 6d2840f

Please sign in to comment.