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

Implement Docker #343

wants to merge 1 commit into from

Conversation

stawiski
Copy link

I wrote a Dockerfile for this. Minimal image, only 53MB!

@google-cla
Copy link

google-cla bot commented May 24, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@stawiski
Copy link
Author

Signed the CLA

@@ -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

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

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 .

Comment on lines +9 to +11
FROM alpine:latest

RUN apk update && apk add libstdc++ libgcc

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


RUN apk update && apk add 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

WORKDIR /bloaty
RUN git clone https://github.com/google/bloaty.git
WORKDIR /bloaty/bloaty
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants