Skip to content

Commit

Permalink
Merge pull request #5 from codewars/reduce-image-size
Browse files Browse the repository at this point in the history
  • Loading branch information
kazk authored Aug 3, 2022
2 parents 709020f + f9dcbeb commit 0679125
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
FROM docker.io/library/ubuntu:22.04

RUN set -ex; \
buildDeps='g++ make cmake wget ca-certificates'; \
apt-get update; \
apt-get install -y --no-install-recommends \
gcc \
g++ \
make \
cmake \
wget \
ca-certificates \
$buildDeps \
; \
apt-get autoremove -y; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -ex; \
cd /tmp; \
mkdir -p /tmp/cgreen; \
wget https://github.com/cgreen-devs/cgreen/archive/refs/tags/1.6.0.tar.gz; \
tar xvf 1.6.0.tar.gz; \
rm -vf 1.6.0.tar.gz; \
cd cgreen-1.6.0; \
make; \
make install; \
cd ..; \
rm -rvf /tmp/cgreen-1.6.0;
tar -xzf 1.6.0.tar.gz -C /tmp/cgreen --strip-components=1; \
rm 1.6.0.tar.gz; \
make -C /tmp/cgreen; \
make -C /tmp/cgreen install; \
apt-get purge -y --auto-remove $buildDeps; \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/*;

ENV LD_LIBRARY_PATH=/usr/local/lib

Expand Down

0 comments on commit 0679125

Please sign in to comment.