docker: use public golang:1.18 image as builder

5 views
Skip to first unread message

nor...@perkeep.org

unread,
Jun 17, 2022, 10:37:53 AM6/17/22
to camlistor...@googlegroups.com


https://github.com/perkeep/perkeep/commit/cd0b392d110069e51b5408bdda95356d776f7031

commit cd0b392d110069e51b5408bdda95356d776f7031
Author: Will Norris <wi...@willnorris.com>
Date: Tue May 3 11:21:58 2022 -0700

docker: use public golang:1.18 image as builder

The only practical difference was that perkeep's builder was installing
libsqlite3-dev, which is no longer needed since c986ee3. This
simplifies our Dockerfile and bumps us to a more recent debian and
go version.

diff --git a/Dockerfile b/Dockerfile
index 458aa58..b585ba8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,35 +7,12 @@
# misc/docker/heiftojpeg's Dockerfile entirely. Not decided best way.
# TODO: likewise, djpeg binary? maybe. https://perkeep.org/issue/1142

-FROM buildpack-deps:stretch-scm AS pkbuild
+FROM golang:1.18 AS pkbuild

MAINTAINER Perkeep Authors <per...@googlegroups.com>

ENV DEBIAN_FRONTEND noninteractive

-# gcc for cgo, sqlite
-RUN apt-get update && apt-get install -y --no-install-recommends \
- g++ \
- gcc \
- libc6-dev \
- make \
- pkg-config \
- libsqlite3-dev
-
-ENV GOLANG_VERSION 1.16.6
-
-WORKDIR /usr/local
-RUN wget -O go.tgz https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz
-RUN echo "be333ef18b3016e9d7cb7b1ff1fdb0cac800ca0be4cf2290fe613b3d069dfe0d go.tgz" | sha256sum -c -
-RUN tar -zxvf go.tgz
-
-ENV GOROOT /usr/local/go
-ENV GOPATH /go
-ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
-
-RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
-WORKDIR $GOPATH
-
# Add each directory separately, so our context doesn't include the
# Dockerfile itself, to permit quicker iteration with docker's
# caching.
Reply all
Reply to author
Forward
0 new messages