Skip to content

Commit

Permalink
[DMS-380] Fix the failing docker image creation on on-prerelease proc…
Browse files Browse the repository at this point in the history
…ess (#365)
  • Loading branch information
CSR2017 authored Dec 9, 2024
1 parent 3e8e6f6 commit 9ed08d0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/on-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ jobs:
DMSTAGS="${{ env.IMAGE_NAME }}:${PACKAGEVERSION},${{ env.IMAGE_NAME }}:${MINOR}"
fi
SEMVERSION=${PACKAGEVERSION} # strip off the leading 'v'
SEMVERSION=${PACKAGEVERSION:5} # strip off the leading 'dms-v'
echo "DMSTAGS=$DMSTAGS" >> $GITHUB_OUTPUT
echo "VERSION=$SEMVERSION" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -517,7 +517,7 @@ jobs:
DMSTAGS="${{ env.IMAGE_NAME }}:${PACKAGEVERSION},${{ env.IMAGE_NAME }}:${MINOR}"
fi
SEMVERSION=${PACKAGEVERSION} # strip off the leading 'v'
SEMVERSION=${PACKAGEVERSION:4} # strip off the leading 'cs-v'
echo "DMSTAGS=$DMSTAGS" >> $GITHUB_OUTPUT
echo "VERSION=$SEMVERSION" >> $GITHUB_OUTPUT
Expand All @@ -539,7 +539,7 @@ jobs:
- name: Build and push Config image
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: "{{defaultContext}}:src/cs"
context: "{{defaultContext}}:src/config"
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:pre
cache-to: type=inline
build-args: VERSION=${{ steps.prepare-tags.outputs.VERSION }}
Expand Down
28 changes: 28 additions & 0 deletions src/config/Nuget.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# SPDX-License-Identifier: Apache-2.0
# Licensed to the Ed-Fi Alliance under one or more agreements.
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
# See the LICENSE and NOTICES files in the project root for more information.

FROM mcr.microsoft.com/dotnet/aspnet:8.0.8-alpine3.20-amd64@sha256:98fa594b91cda6cac28d2aae25567730db6f8857367fab7646bdda91bc784b5f AS runtimebase

LABEL maintainer="Ed-Fi Alliance, LLC and Contributors <[email protected]>"

RUN apk --no-cache add gettext=~0 postgresql16-client=~16

FROM runtimebase AS setup

ARG VERSION=0.0.0
ENV ASPNETCORE_HTTP_PORTS=8080

WORKDIR /app

RUN echo "Tag Version:" $VERSION

RUN wget -O /app/EdFi.DmsConfigurationService.zip "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_apis/packaging/feeds/EdFi/nuget/packages/EdFi.DmsConfigurationService/versions/${VERSION}/content" && \
unzip /app/EdFi.DmsConfigurationService.zip -d /app/ && \
rm -f /app/EdFi.DmsConfigurationService.zip
COPY --chmod=600 appsettings.template.json /app/appsettings.template.json

COPY --chmod=700 run.sh /app/run.sh
EXPOSE ${ASPNETCORE_HTTP_PORTS}
ENTRYPOINT ["/bin/ash","/app/run.sh"]

0 comments on commit 9ed08d0

Please sign in to comment.