From 3bdef5475903d20bdb75000667590ed80e32b1be Mon Sep 17 00:00:00 2001 From: tshak Date: Fri, 3 Nov 2023 16:09:38 +0100 Subject: [PATCH] Bump Go in Docker and support latest github.com hosts --- docker/Dockerfile | 4 ++-- docker/known_hosts.sh | 15 ++++----------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index ec6eda3..9f2af7f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17-alpine as builder +FROM golang:1.21-alpine as builder ARG VERSION=0.0.0-docker WORKDIR /app RUN apk --no-cache add ca-certificates git @@ -15,7 +15,7 @@ COPY . . RUN CGO_ENABLED=0 go build -ldflags="-w -s -X 'github.com/riser-platform/riser-server/pkg/util.VersionString=${VERSION}'" -o /go/bin/riser-server -FROM alpine:3.13 +FROM alpine:3.18 RUN apk --no-cache add ca-certificates git openssh-client # Add git hosts to known hosts file so we can use # StrickHostKeyChecking with git+ssh diff --git a/docker/known_hosts.sh b/docker/known_hosts.sh index 770e604..c80a19a 100755 --- a/docker/known_hosts.sh +++ b/docker/known_hosts.sh @@ -10,8 +10,7 @@ set -eu known_hosts_file=${1} known_hosts_file=${known_hosts_file:-/etc/ssh/ssh_known_hosts} -hosts="github.com gitlab.com bitbucket.org ssh.dev.azure.com vs-ssh.visualstudio.com" -hosts_2022="source.developers.google.com" +hosts="github.com" # The heredoc below was generated by constructing a known_hosts using # @@ -40,21 +39,15 @@ export LC_ALL=C generate() { ssh-keyscan ${hosts} > ${known_hosts_file} - ssh-keyscan -p 2022 ${hosts_2022} >> ${known_hosts_file} } validate() { ssh-keygen -l -f ${known_hosts_file} | sort > "$fingerprints" diff - "$fingerprints" <