-
Notifications
You must be signed in to change notification settings - Fork 207
Adding Debian Buster Dockerfile #141
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Neolink Docker image build scripts | ||
| # Copyright (c) 2020 George Hilliard | ||
| # SPDX-License-Identifier: AGPL-3.0-only | ||
|
|
||
| FROM docker.io/rust:buster AS build | ||
| MAINTAINER thirtythreeforty@gmail.com | ||
|
|
||
| ENV DEBIAN_FRONTEND=noninteractive | ||
| RUN set -eux; \ | ||
| apt-get update; \ | ||
| apt-get install -y --no-install-recommends \ | ||
| build-essential \ | ||
| musl-dev gcc \ | ||
| libgstrtspserver-1.0-dev \ | ||
| libgstreamer1.0-dev \ | ||
| libgtk2.0-dev \ | ||
| libglib2.0-dev; \ | ||
| apt-get clean -y; \ | ||
| rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
|
||
| # Use static linking to work around https://github.com/rust-lang/rust/pull/58575 | ||
| ENV RUSTFLAGS='-C target-feature=-crt-static' | ||
|
Comment on lines
+21
to
+22
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't this workaround only required on musl?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe because of this it didn't work without |
||
|
|
||
| WORKDIR /usr/local/src/neolink | ||
|
|
||
| # Build the main program | ||
| COPY . /usr/local/src/neolink | ||
| RUN cargo build --release | ||
|
|
||
| # Create the release container. Match the base OS used to build | ||
| FROM debian:buster-slim | ||
|
|
||
| ENV DEBIAN_FRONTEND=noninteractive | ||
| RUN set -eux; \ | ||
| apt-get update; \ | ||
| apt-get install -y --no-install-recommends \ | ||
| musl-dev \ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dev packages not need on publish image
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmmm odd. I should have my buster image on one of my branches. I'll dig it up in the morning and see what else is different. |
||
| libgstrtspserver-1.0-0 \ | ||
| libgstreamer1.0-0 \ | ||
| gstreamer1.0-plugins-good \ | ||
| gstreamer1.0-plugins-bad; \ | ||
| apt-get clean -y; \ | ||
| rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
|
||
| COPY --from=build \ | ||
| /usr/local/src/neolink/target/release/neolink \ | ||
| /usr/local/bin/neolink | ||
|
|
||
| ENTRYPOINT [ "/usr/local/bin/neolink" ] | ||
| CMD [ "--config", "/etc/neolink.toml" ] | ||
|
|
||
| EXPOSE 8554 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably don't need
musl-devon a buster.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without it, it didn't work.