From e627cf1708eeb4b21e17d6d872af4f1b7fcf28f9 Mon Sep 17 00:00:00 2001 From: Thuan Bui Date: Wed, 24 May 2023 16:03:15 +0700 Subject: [PATCH] Update Dockerfile Replace ubuntu with alpine base image to reduce docker image size from 450MB to 10MB --- Dockerfile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index dc20c1b..b18ac37 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,10 @@ -FROM ubuntu:18.04 +FROM alpine:3.14 WORKDIR /app -#RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list -#RUN sed -i s@/security.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list -RUN apt-get update -RUN apt-get -y install vim cmake build-essential wget git +RUN apk update +RUN apk add --no-cache cmake build-base git && \ + git clone https://github.com/10h30/lookbusy.git && \ + cd lookbusy && chmod +x ./configure && ./configure && make && \ + apk del build-base git cmake -RUN git clone https://github.com/10h30/lookbusy.git -RUN cd lookbusy && chmod +x ./configure && ./configure && make -# COPY start.sh /root/ CMD ["sh", "/app/start.sh"]