From 23bfdb65ab77d6b41d180971d82957e875683cae Mon Sep 17 00:00:00 2001 From: Manuel Date: Wed, 12 May 2021 07:30:49 +0200 Subject: [PATCH] Reduce language image sizes --- languages/brainfuck/Dockerfile | 8 ++++---- languages/c/Dockerfile | 3 +-- languages/cpp/Dockerfile | 3 +-- languages/idris/Dockerfile | 3 ++- languages/lua/Dockerfile | 3 +-- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/languages/brainfuck/Dockerfile b/languages/brainfuck/Dockerfile index 067f601..16300c1 100644 --- a/languages/brainfuck/Dockerfile +++ b/languages/brainfuck/Dockerfile @@ -1,12 +1,12 @@ -FROM alpine AS build +FROM alpine as build -RUN apk update && apk add g++ COPY bf.cpp . -RUN g++ bf.cpp -o bf +RUN apk add --no-cache g++ && \ + g++ bf.cpp -o bf FROM alpine LABEL author="1Computer1" -RUN apk update && apk add libstdc++ +RUN apk add --no-cache libstdc++ COPY --from=build bf /usr/local/bin/ COPY run.sh /var/run/ diff --git a/languages/c/Dockerfile b/languages/c/Dockerfile index 1324766..862b281 100644 --- a/languages/c/Dockerfile +++ b/languages/c/Dockerfile @@ -1,7 +1,6 @@ FROM alpine LABEL author="1Computer1" -RUN apk update -RUN apk add gcc libc-dev +RUN apk add --no-cache gcc libc-dev COPY run.sh /var/run/ diff --git a/languages/cpp/Dockerfile b/languages/cpp/Dockerfile index 37bc37b..2242843 100644 --- a/languages/cpp/Dockerfile +++ b/languages/cpp/Dockerfile @@ -1,7 +1,6 @@ FROM alpine LABEL author="1Computer1" -RUN apk update -RUN apk add g++ +RUN apk add --no-cache g++ COPY run.sh /var/run/ diff --git a/languages/idris/Dockerfile b/languages/idris/Dockerfile index 04b8d8f..418b58f 100644 --- a/languages/idris/Dockerfile +++ b/languages/idris/Dockerfile @@ -2,6 +2,7 @@ FROM alpine:latest RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \ apk update && \ - apk add idris@testing + apk add idris@testing && \ + rm -rf /var/cache/apk/* COPY run.sh /var/run/ diff --git a/languages/lua/Dockerfile b/languages/lua/Dockerfile index 0835675..c15ec01 100644 --- a/languages/lua/Dockerfile +++ b/languages/lua/Dockerfile @@ -1,6 +1,5 @@ FROM alpine -RUN apk update -RUN apk add lua5.3 +RUN apk add --no-cache lua5.3 COPY run.sh /var/run/