|
| 1 | +# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"). You may |
| 4 | +# not use this file except in compliance with the License. A copy of the |
| 5 | +# License is located at |
| 6 | +# |
| 7 | +# http://aws.amazon.com/apache2.0/ |
| 8 | +# |
| 9 | +# or in the "license" file accompanying this file. This file is distributed |
| 10 | +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 11 | +# express or implied. See the License for the specific language governing |
| 12 | +# permissions and limitations under the License. |
| 13 | + |
| 14 | +ARG GO_VERSION |
| 15 | +FROM public.ecr.aws/docker/library/golang:${GO_VERSION} |
| 16 | + |
| 17 | +ENV XDG_CACHE_HOME /tmp |
| 18 | + |
| 19 | +RUN go env -w GOPROXY=direct |
| 20 | + |
| 21 | +# Install Amazon Coretto for OpenJDK 23. |
| 22 | +# https://docs.aws.amazon.com/corretto/latest/corretto-23-ug/generic-linux-install.html |
| 23 | +RUN wget -O - https://apt.corretto.aws/corretto.key | \ |
| 24 | + gpg --dearmor -o /usr/share/keyrings/corretto-keyring.gpg && \ |
| 25 | + echo "deb [signed-by=/usr/share/keyrings/corretto-keyring.gpg] https://apt.corretto.aws stable main" | \ |
| 26 | + tee /etc/apt/sources.list.d/corretto.list |
| 27 | + |
| 28 | +RUN apt-get update && \ |
| 29 | + apt-get install -y --no-install-recommends java-23-amazon-corretto-jdk |
| 30 | + |
| 31 | +RUN mkdir -p /go/src/github.com/aws/ |
| 32 | + |
| 33 | +RUN git clone https://github.com/aws/aws-sdk-go-v2.git /go/src/github.com/aws/aws-sdk-go-v2 |
| 34 | + |
| 35 | +WORKDIR /go/src/github.com/aws/aws-sdk-go-v2 |
| 36 | + |
| 37 | +# Remove test codegen directories to speed up the SDK codegen process. |
| 38 | +RUN rm -r codegen/protocol-test-codegen codegen/smithy-aws-go-codegen/src/test |
| 39 | + |
| 40 | +RUN make smithy-go-publish-local |
| 41 | + |
| 42 | +CMD ["make", "smithy-generate", "update-requires", "update-module-metadata", "min-go-version-service_.", "tidy-modules-service_."] |
0 commit comments