github.com/opentofu/opentofu@v1.7.1/internal/backend/remote-state/consul/Dockerfile (about) 1 # Copyright (c) The OpenTofu Authors 2 # SPDX-License-Identifier: MPL-2.0 3 # Copyright (c) 2023 HashiCorp, Inc. 4 # SPDX-License-Identifier: MPL-2.0 5 6 FROM consul:1.15 7 8 # install dependencies to install Go 9 RUN apk add -q curl tar 10 11 # download Go 12 ARG GO_VERSION 13 RUN if [ "$(uname -m)"=="aarch64" ]; then curl -SLo /tmp/go.tar.gz https://go.dev/dl/go${GO_VERSION}.linux-arm64.tar.gz;\ 14 elif [ "$(uname -m)"=="arm64" ]; then curl -SLo /tmp/go.tar.gz https://go.dev/dl/go${GO_VERSION}.linux-arm64.tar.gz;\ 15 elif [ "$(uname -m)"=="arm" ]; then curl -SLo /tmp/go.tar.gz https://go.dev/dl/go${GO_VERSION}.linux-armv6l.tar.gz;\ 16 else curl -SLo /tmp/go.tar.gz https://go.dev/dl/go${GO_VERSION}.linux-386.tar.gz; \ 17 fi 18 19 # install Go 20 RUN cd tmp && \ 21 tar -xzf go.tar.gz && \ 22 ln -s /tmp/go/bin/go /usr/local/bin/go && \ 23 rm go.tar.gz 24 25 # cleanup installation dependencies 26 RUN apk del -q curl tar 27 28 VOLUME "/app" 29 WORKDIR "/app" 30 31 ENV TF_CONSUL_TEST=1 32 ENTRYPOINT [ "go" ]