start upgrade to golang 1.19.4 and alpine 3.17.0 (#9417)

* start upgrade to 1.19.4

Signed-off-by: James Strong <james.strong@chainguard.dev>

* add matrix to image test-image

Signed-off-by: James Strong <james.strong@chainguard.dev>

* update to alpine 3.17

Signed-off-by: James Strong <james.strong@chainguard.dev>

* remove need for curl

Signed-off-by: James Strong <james.strong@chainguard.dev>

Signed-off-by: James Strong <james.strong@chainguard.dev>
This commit is contained in:
James Strong 2022-12-18 20:07:43 -05:00 committed by GitHub
parent 17d8266a2a
commit e3e0d9c1f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 106 additions and 21 deletions

View file

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM alpine:3.16.2
FROM alpine:3.17.0
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk add --no-cache \

View file

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.19.1-alpine as builder
FROM golang:1.19.4-alpine3.17 as builder
RUN apk add git
WORKDIR /go/src/k8s.io/ingress-nginx/images/custom-error-pages

View file

@ -1,4 +1,4 @@
FROM golang:1.19.2-alpine3.16 as builder
FROM golang:1.19.4-alpine3.17 as builder
RUN mkdir /authsvc
WORKDIR /authsvc
COPY . ./

View file

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.14-alpine as builder
FROM golang:1.19.4-alpine3.17 as builder
WORKDIR /go/src/k8s.io/ingress-nginx/images/fastcgi

View file

@ -1,9 +1,9 @@
FROM golang:buster as build
FROM golang:1.19.4-alpine3.17 as build
WORKDIR /go/src/greeter-server
RUN curl -o main.go https://raw.githubusercontent.com/grpc/grpc-go/91e0aeb192456225adf27966d04ada4cf8599915/examples/features/reflection/server/main.go && \
go mod init greeter-server && \
COPY main.go .
RUN go mod init greeter-server && \
go mod tidy && \
go build -o /greeter-server main.go

View file

@ -0,0 +1,78 @@
/*
*
* Copyright 2019 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
// Binary server is an example server.
package main
import (
"context"
"flag"
"fmt"
"log"
"net"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
ecpb "google.golang.org/grpc/examples/features/proto/echo"
hwpb "google.golang.org/grpc/examples/helloworld/helloworld"
)
var port = flag.Int("port", 50051, "the port to serve on")
// hwServer is used to implement helloworld.GreeterServer.
type hwServer struct {
hwpb.UnimplementedGreeterServer
}
// SayHello implements helloworld.GreeterServer
func (s *hwServer) SayHello(ctx context.Context, in *hwpb.HelloRequest) (*hwpb.HelloReply, error) {
return &hwpb.HelloReply{Message: "Hello " + in.Name}, nil
}
type ecServer struct {
ecpb.UnimplementedEchoServer
}
func (s *ecServer) UnaryEcho(ctx context.Context, req *ecpb.EchoRequest) (*ecpb.EchoResponse, error) {
return &ecpb.EchoResponse{Message: req.Message}, nil
}
func main() {
flag.Parse()
lis, err := net.Listen("tcp", fmt.Sprintf(":%d", *port))
if err != nil {
log.Fatalf("failed to listen: %v", err)
}
fmt.Printf("server listening at %v\n", lis.Addr())
s := grpc.NewServer()
// Register Greeter on the server.
hwpb.RegisterGreeterServer(s, &hwServer{})
// Register RouteGuide on the same server.
ecpb.RegisterEchoServer(s, &ecServer{})
// Register reflection service on gRPC server.
reflection.Register(s)
if err := s.Serve(lis); err != nil {
log.Fatalf("failed to serve: %v", err)
}
}

View file

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM alpine:3.16.2
FROM alpine:3.17.0
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8

View file

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM --platform=$BUILDPLATFORM golang:1.19.2 as builder
FROM --platform=$BUILDPLATFORM golang:1.19.4 as builder
ARG BUILDPLATFORM
ARG TARGETARCH

View file

@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM alpine:3.16.2 as builder
FROM alpine:3.17.0 as builder
COPY . /

View file

@ -13,7 +13,7 @@
# limitations under the License.
FROM alpine:3.16.2 as base
FROM alpine:3.17.0 as base
RUN mkdir -p /opt/third_party/install
COPY . /opt/third_party/

View file

@ -39,7 +39,7 @@ build: ensure-buildx
--progress=$(PROGRESS) \
--pull \
--build-arg BASE_IMAGE=$(NGINX_BASE_IMAGE) \
--build-arg GOLANG_VERSION=1.19.2 \
--build-arg GOLANG_VERSION=1.19.4 \
--build-arg ETCD_VERSION=3.4.3-0 \
--build-arg K8S_RELEASE=v1.24.2 \
--build-arg RESTY_CLI_VERSION=0.27 \

View file

@ -16,7 +16,7 @@ ARG BASE_IMAGE
ARG GOLANG_VERSION
ARG ETCD_VERSION
FROM golang:${GOLANG_VERSION}-alpine as GO
FROM golang:${GOLANG_VERSION}-alpine3.17 as GO
FROM registry.k8s.io/etcd:${ETCD_VERSION} as etcd
FROM ${BASE_IMAGE}