Dockerizing segvan#2
Open
kaplanmaxe wants to merge 1 commit into
Open
Conversation
|
Maybe it would be better if you did a multi-stage build, the first one a static build and the second one Something like this: FROM alpine:edge AS builder
RUN apk add --no-cache \
build-base \
cmake \
git \
libuv-dev \
&& git clone https://github.com/xmrig/xmrig.git /xmrig \
&& mkdir /xmrig/build \
&& cd /xmrig/build \
&& cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_HTTPD=OFF \
-DCMAKE_EXE_LINKER_FLAGS="-static" \
-DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \
&& make -j$(nproc) \
&& strip ./xmrig
FROM scratch
COPY --from=builder /xmrig/build/xmrig /
ENTRYPOINT ["/xmrig"] |
Author
|
@matthewincognito Thanks for the feedback! This could work as well... didn't spend much time on it. I don't think saving a few mbs here in the image is all that important considering it's not going into a production environment or anything. I guess I will leave it up to the maintainer. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds docker to
segvan. The idea behind this is that an image can be pushed to docker hub and a user could simply pull down the image and not have to worry about installation. Instructions have been added toREADME.md.