From c881a3f8ffb80b684f367660178d38ceabc065c2 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Tue, 5 Jan 2021 17:17:50 +0200 Subject: [PATCH] Change base from golang:latest to debian:buster (#28) Change base from golang:latest to debian:buster, to cut down on our image size. This closes #27. Starting size: frodo ~ $ docker image ls golang:latest REPOSITORY TAG IMAGE ID CREATED SIZE golang latest 5f9d35ce5cfe 2 weeks ago 839MB Updated size: frodo ~ $ docker image ls debian:buster REPOSITORY TAG IMAGE ID CREATED SIZE debian buster 6d6b00c22231 3 weeks ago 114MB That should make our image correspondingly smaller. * Combine commands to reduce layers --- Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 225d39e..67e44e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:latest +FROM debian:buster LABEL "com.github.actions.name"="github-action-publish-binaries" LABEL "com.github.actions.description"="Upload artifacts when new releases are made" @@ -10,11 +10,9 @@ LABEL repository="http://github.com/skx/github-action-publish-binaries" LABEL homepage="http://github.com/skx/github-action-publish-binaries" LABEL maintainer="Steve Kemp " -RUN apt-get update -RUN apt-get install --yes \ - ca-certificates \ - curl \ - jq +RUN apt-get update && \ + apt-get install --yes ca-certificates curl jq && \ + apt-get clean COPY upload-script /usr/bin/upload-script