Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .vscode/launch.json

This file was deleted.

16 changes: 0 additions & 16 deletions .vscode/settings.json

This file was deleted.

26 changes: 11 additions & 15 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
ARG BUILDER_IMAGE=golang:1.25-bookworm
ARG BASE_IMAGE=scratch

FROM ${BUILDER_IMAGE} AS builder
FROM golang:1.25-alpine AS builder

ARG TARGETARCH
ARG BUILD_TARGET

WORKDIR /go/src/app
ENV CGO_ENABLED=0
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=UTC

RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates tzdata && \
rm -rf /var/lib/apt/lists/* && update-ca-certificates
ENV CGO_ENABLED=0 \
TZ=UTC

RUN apk add --no-cache ca-certificates tzdata

COPY go.mod go.sum ./
RUN go mod download
RUN --mount=type=cache,target=/go/pkg/mod,sharing=locked \
go mod download

COPY . .

Expand All @@ -27,12 +23,12 @@ RUN --mount=type=cache,target=/go/pkg/mod,sharing=locked \

RUN mkdir -p -m 0777 /app-tmp

FROM ${BASE_IMAGE}
FROM scratch

ARG BUILD_TAG
ENV BUILD_TAG=${BUILD_TAG}
ENV ZONEINFO=/usr/share/zoneinfo
ENV TMPDIR=/tmp
ENV BUILD_TAG=${BUILD_TAG} \
ZONEINFO=/usr/share/zoneinfo \
TMPDIR=/tmp

COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
Expand Down
26 changes: 0 additions & 26 deletions compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,46 +46,23 @@ elif [ "$1" = "build" ]; then
fi

if [ "$ENVIRONMENT" = "local" ] || [ "$ENVIRONMENT" = "develop" ] || [ "$ENVIRONMENT" = "test" ] || [ "$ENVIRONMENT" = "prod" ]; then
SCRATCH_BASE_IMAGE=scratch
REPORT_BASE_IMAGE=node:22-bookworm-slim
SLCLIENT_BASE_IMAGE=alpine:3.21

if [ "$ENVIRONMENT" = "test" ] || [ "$ENVIRONMENT" = "prod" ]; then
SCRATCH_BASE_IMAGE=registry1.dso.mil/ironbank/docker/scratch:ironbank
REPORT_BASE_IMAGE=registry1.dso.mil/ironbank/opensource/nodejs/debian/nodejs:22.21.1
SLCLIENT_BASE_IMAGE=registry1.dso.mil/ironbank/opensource/alpinelinux/alpine:3.21
AMD64_TARGET_PLATFORM=true
fi

BUILDER_ARGS=""
if docker context inspect colima-amd64-builder >/dev/null 2>&1 &&
[ "$(docker context show)" = "colima-amd64-builder" ]; then
BUILDER_ARGS="--builder colima-amd64"
fi

BUILT_SERVICES=()

for BUILD_TARGET in "${SERVICES[@]}"; do
case $BUILD_TARGET in
midas-report)
docker buildx build \
${AMD64_TARGET_PLATFORM:+$BUILDER_ARGS --platform=linux/amd64} \
--provenance=false \
--build-arg "BASE_IMAGE=${REPORT_BASE_IMAGE}" \
-t midas-report:"$ENVIRONMENT" \
--load \
${AMD64_TARGET_PLATFORM:+"--progress=plain"} \
report
BUILT_SERVICES+=("$BUILD_TARGET")
;;
midas-sl-client)
docker buildx build \
${AMD64_TARGET_PLATFORM:+$BUILDER_ARGS --platform=linux/amd64} \
--provenance=false \
--build-arg "BASE_IMAGE=${SLCLIENT_BASE_IMAGE}" \
-t midas-sl-client:"$ENVIRONMENT" \
--load \
${AMD64_TARGET_PLATFORM:+"--progress=plain"} \
sl-client
BUILT_SERVICES+=("$BUILD_TARGET")
;;
Expand All @@ -95,14 +72,11 @@ elif [ "$1" = "build" ]; then
continue
fi
docker buildx build \
${AMD64_TARGET_PLATFORM:+$BUILDER_ARGS --platform=linux/amd64} \
--provenance=false \
--build-arg "BASE_IMAGE=${SCRATCH_BASE_IMAGE}" \
--build-arg "BUILD_TAG=$ENVIRONMENT" \
--build-arg "BUILD_TARGET=${BUILD_TARGET}" \
-t "$BUILD_TARGET":"$ENVIRONMENT" \
--load \
${AMD64_TARGET_PLATFORM:+"--progress=plain"} \
api
BUILT_SERVICES+=("$BUILD_TARGET")
;;
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 0 additions & 8 deletions mock/telemetry/Dockerfile

This file was deleted.

210 changes: 0 additions & 210 deletions mock/telemetry/telemetry_post_tester.py

This file was deleted.

Loading