Skip to content
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

Implement Docker #343

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM alpine:latest AS build

RUN apk update && apk add git cmake build-base zlib-dev

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RUN apk update && apk add git cmake build-base zlib-dev
RUN apk add --no-cache git cmake build-base zlib-dev

WORKDIR /bloaty
RUN git clone https://github.com/google/bloaty.git
WORKDIR /bloaty/bloaty
Comment on lines +4 to +6

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
WORKDIR /bloaty
RUN git clone https://github.com/google/bloaty.git
WORKDIR /bloaty/bloaty
WORKDIR /bloaty
RUN git clone --depth=1 https://github.com/google/bloaty.git .

RUN cmake -B build -S . && cmake --build build && cmake --build build --target install

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RUN cmake -B build -S . && cmake --build build && cmake --build build --target install
RUN cmake -B build -S . \
&& cmake --build build \
&& cmake --build build --target install


FROM alpine:latest

RUN apk update && apk add libstdc++ libgcc
Comment on lines +9 to +11

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FROM alpine:latest
RUN apk update && apk add libstdc++ libgcc
FROM alpine:latest
RUN apk add --no-cache libstdc++ libgcc


COPY --from=build /bloaty/bloaty/build/bloaty /usr/local/bin/bloaty

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
COPY --from=build /bloaty/bloaty/build/bloaty /usr/local/bin/bloaty
COPY --link --from=build /bloaty/build/bloaty /usr/local/bin/bloaty


# Check that bloaty is installed
RUN bloaty --version

ENTRYPOINT [ "bloaty" ]