From f963bce8293df7d62e51b1fb5f3dc06964a97991 Mon Sep 17 00:00:00 2001 From: vyshali-chitikeshi Date: Tue, 26 Sep 2023 12:55:11 -0700 Subject: [PATCH] fix: updated remote spire agent docker file Signed-off-by: vyshali-chitikeshi --- .../remote/remote-spire-agent/Dockerfile | 27 +++---------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/security/remote_devices/spiffe_and_ssh/remote/remote-spire-agent/Dockerfile b/security/remote_devices/spiffe_and_ssh/remote/remote-spire-agent/Dockerfile index bbd3a4fc..bee65d87 100644 --- a/security/remote_devices/spiffe_and_ssh/remote/remote-spire-agent/Dockerfile +++ b/security/remote_devices/spiffe_and_ssh/remote/remote-spire-agent/Dockerfile @@ -15,37 +15,16 @@ # # ---------------------------------------------------------------------------------- -# Build utility container -ARG BUILDER_BASE=golang:1.20-alpine3.17 -FROM ${BUILDER_BASE} AS builder - -WORKDIR /edgex-go - -RUN sed -e 's/dl-cdn[.]alpinelinux.org/nl.alpinelinux.org/g' -i~ /etc/apk/repositories - -RUN apk add --update --no-cache make git build-base curl - -ARG SPIRE_RELEASE=1.6.3 - -# build spire from the source in order to be compatible with arch arm64 as well -RUN mkdir -p spire-build -WORKDIR /edgex-go/spire-build -RUN wget -q "https://github.com/spiffe/spire/archive/refs/tags/v${SPIRE_RELEASE}.tar.gz" && \ - tar xv --strip-components=1 -f "v${SPIRE_RELEASE}.tar.gz" && \ - echo "building spire from source..." && \ - make bin/spire-server bin/spire-agent - # Deployment image FROM alpine:3.17 LABEL license='SPDX-License-Identifier: Apache-2.0' \ - copyright='Copyright (c) 2022 Intel Corporation' + copyright='Copyright (c) 2023 Intel Corporation' -RUN sed -e 's/dl-cdn[.]alpinelinux.org/nl.alpinelinux.org/g' -i~ /etc/apk/repositories RUN apk update && apk --no-cache --update add dumb-init openssl gcompat -COPY --from=builder /edgex-go/spire-build/bin/spire-agent /usr/local/bin -COPY --from=builder /edgex-go/spire-build/bin/spire-server /usr/local/bin +COPY --from=ghcr.io/spiffe/spire-agent:1.6.3 /opt/spire/bin/spire-agent /usr/local/bin +COPY --from=ghcr.io/spiffe/spire-server:1.6.3 /opt/spire/bin/spire-server /usr/local/bin COPY docker-entrypoint.sh /usr/local/bin/ COPY agent.conf /usr/local/etc/spire/agent.conf.tpl