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

Docker for flame #12

Merged
merged 2 commits into from
Apr 17, 2019
Merged

Docker for flame #12

merged 2 commits into from
Apr 17, 2019

Conversation

supernomad
Copy link
Contributor

Implements a Docker based build for flamethrower. This could use some more tweaks for the overall size of the resulting image, but currently working as expected.

@supernomad
Copy link
Contributor Author

supernomad commented Apr 16, 2019

Kicked off the push build again got this:

$ rvm $brew_ruby do brew update 1>/dev/null
==> Downloading https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.3.7.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring portable-ruby-2.3.7.mavericks.bottle.tar.gz
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated

@fcelda
Copy link
Member

fcelda commented Apr 16, 2019

I've a similar change I didn't commit. I think my version results in a smaller image but doesn't build ldns/libuv from source so it's probably more likely to break. What do you think, @supernomad?

FROM ubuntu:disco AS build
ENV BUILD_DEPS g++ cmake make libldns-dev libuv1-dev pkgconf
RUN \
    apt-get update && \
    apt-get install --yes --no-install-recommends ${BUILD_DEPS}
COPY . /src
RUN \
    mkdir /tmp/build && \
    cd /tmp/build && \
    cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo /src && \
    make all tests && \
    ./tests

FROM ubuntu:disco AS runtime
ENV RUNTIME_DEPS libldns2 libuv1
RUN \
    apt-get update && \
    apt-get install --yes --no-install-recommends ${RUNTIME_DEPS} && \
    rm -rf /var/lib/apt/lists/*
COPY --from=build /tmp/build/flame /usr/local/bin/flame
ENTRYPOINT /usr/local/bin/flame

@supernomad
Copy link
Contributor Author

@fcelda yea this definitely will result in a much smaller image I think the idea that apt will fail is likely a non issue. I just used the build scripts to keep in line with the travis build, not really because I thought it would fail via apt (also apt for bionic doesn't have the right libuv version)

More than happy to run with your version sir 👍

…nd added a blurb in the README to show how to build the new docker
@fcelda
Copy link
Member

fcelda commented Apr 16, 2019

LGTM. Thanks!

@supernomad supernomad merged commit 817f91d into master Apr 17, 2019
@supernomad supernomad deleted the docker_build branch April 17, 2019 19:43
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.

None yet

2 participants