Skip to content

Commit

Permalink
fix: updated remote spire agent docker file
Browse files Browse the repository at this point in the history
Signed-off-by: vyshali-chitikeshi <[email protected]>
  • Loading branch information
vyshali-chitikeshi committed Sep 26, 2023
1 parent eef60d0 commit dcdd284
Showing 1 changed file with 2 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,17 @@

# 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'

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
Expand Down

0 comments on commit dcdd284

Please sign in to comment.