From 40a1a4421bf96a369d33b540a4c1b750be4754c9 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Sat, 9 Mar 2024 17:34:46 +0100 Subject: [PATCH] docker: avoid warnings and reduce size --- .github/workflows/docker-image.yml | 2 +- Dockerfile | 21 +++++++-------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index d16b1ec3a0..dbecc984a8 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build the Docker image run: docker build . --file Dockerfile --tag ccminer:latest --no-cache - name: Docker image list diff --git a/Dockerfile b/Dockerfile index 1181bb4fea..e2983b9a84 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,17 +4,13 @@ ENV TZ=Etc/UTC RUN apt-get update && \ apt-get upgrade -y && \ apt-get dist-upgrade -y && \ - apt-get install libcurl4-openssl-dev \ + apt-get install libcurl4 libcurl4-openssl-dev \ libssl-dev \ libjansson-dev \ automake \ autotools-dev \ build-essential \ git \ - freeglut3 \ - freeglut3-dev \ - libxi-dev \ - libxmu-dev \ wget \ -y RUN wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin @@ -25,18 +21,15 @@ RUN apt-key add /var/cuda-repo-ubuntu2204-11-8-local/*.pub RUN cp /var/cuda-repo-ubuntu2204-11-8-local/cuda-*-keyring.gpg /usr/share/keyrings/ RUN apt-get update RUN apt-get -y install cuda +RUN rm *.deb RUN git clone https://github.com/tpruvot/ccminer WORKDIR ccminer RUN git checkout linux RUN ./build.sh +RUN strip -s ccminer +RUN make install RUN ldconfig /usr/local/cuda/lib64 -#RUN ./ccminer --version -RUN apt-get remove libcurl4-openssl-dev \ - libssl-dev \ - libjansson-dev \ - freeglut3 \ - freeglut3-dev \ - libxi-dev \ - libxmu-dev \ - -y +RUN make clean +#RUN ccminer --version +RUN apt-get remove -y libcurl4-openssl-dev libssl-dev libjansson-dev #ENTRYPOINT [ "./ccminer" ]