-
Notifications
You must be signed in to change notification settings - Fork 13
[ADMNAPI-989] Add read me file and fix docker file warnings #96
Changes from all commits
c6f7a67
1f6c251
756f4fd
9a66db0
a7a4656
5bbf212
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Linux scripts always need to have lf | ||
| *.sh text eol=lf |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Docker files details | ||
|
|
||
| ## Development environment | ||
|
|
||
| 1. dev.Dockerfile | ||
|
|
||
| The purpose of this file is to facilitate the setup of Admin API docker image in | ||
| the development environment, allowing for local testing with latest changes. | ||
| It utilizes the assets and dlls from "Docker\Application\EdFi.Ods.AdminApi" | ||
| folder. | ||
|
|
||
| 2. dbadmin.Dockerfile | ||
|
|
||
| Purpose of this file to setup the EdFi_Admin database image which includes Admin | ||
| API specific tables. It utilizes database artifacts located at | ||
| "Docker\Application\EdFi.Ods.AdminApi\Artifacts\PgSql\Structure\Admin". | ||
|
|
||
| > [!NOTE] | ||
| > The "EdFi.Ods.AdminApi" application folder and "Nuget.config" file will be | ||
| > copied over, either manually or through the execution of a script(`build.ps1 | ||
| > -Command "CopyToDockerContext"`), to the "Application" folder | ||
| > within the "Docker" directory. | ||
|
|
||
| ## Non-development environments | ||
|
|
||
| 1. api.Dockerfile | ||
|
|
||
| File for setting up Admin API docker image with assets and dlls sourced from | ||
| "EdFi.Suite3.ODS.AdminApi" nuget package(from | ||
| https://pkgs.dev.azure.com/ed-fi-alliance). | ||
|
|
||
| 2. \Docker\Settings\DB-Admin\pgsql\Dockerfile | ||
|
|
||
| This file to setup the EdFi_Admin database image which includes Admin API | ||
| specific tables. The database artifacts will be downloaded from | ||
| "EdFi.Suite3.ODS.AdminApi" nuget package(from | ||
| https://pkgs.dev.azure.com/ed-fi-alliance). | ||
|
|
||
| For detailed instructions on setting up docker containers, please refer | ||
| [docker.md](../docs/docker.md). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,24 +4,29 @@ | |
| # See the LICENSE and NOTICES files in the project root for more information. | ||
|
|
||
| #tag 6.0-alpine | ||
| FROM mcr.microsoft.com/dotnet/aspnet@sha256:201cedd60cb295b2ebea7184561a45c5c0ee337e37300ea0f25cff5a2c762538 | ||
| LABEL maintainer="Ed-Fi Alliance, LLC and Contributors <techsupport@ed-fi.org>" | ||
| ARG VERSION=latest | ||
| FROM mcr.microsoft.com/dotnet/aspnet@sha256:201cedd60cb295b2ebea7184561a45c5c0ee337e37300ea0f25cff5a2c762538 AS base | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I really thought that I saw the api.nuget.org connectivity problem being resolved a few days ago when I just moved the But... I did find an easy solution: just update the base image to the .NET 8 version! Even though .NET 8 upgrade isn't finished, the SDK for .NET 8 will build a project that targets .NET 6. Changing to the following solved the problem for me. This is slightly newer than the version we have in Admin API 1 - this version must have been released just a few days ago. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A PR into your branch: #97 |
||
| ARG DB=pgsql | ||
|
|
||
| RUN apk --no-cache add curl=~8 unzip=~6 dos2unix=~7 bash=~5 gettext=~0 jq=~1 icu=~72 && \ | ||
| if [ "$DB" = "pgsql" ]; then apk --no-cache add postgresql13-client=~13; fi && \ | ||
| addgroup -S edfi && adduser -S edfi -G edfi | ||
|
|
||
| FROM base as build | ||
| LABEL maintainer="Ed-Fi Alliance, LLC and Contributors <techsupport@ed-fi.org>" | ||
|
|
||
| # Alpine image does not contain Globalization Cultures library so we need to install ICU library to get for LINQ expression to work | ||
| # Disable the globaliztion invariant mode (set in base image) | ||
| ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false | ||
| ARG VERSION=latest | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| COPY Settings/"${DB}"/appsettings.template.json /app/appsettings.template.json | ||
| COPY Settings/"${DB}"/run.sh /app/run.sh | ||
| COPY --chmod=600 Settings/"${DB}"/appsettings.template.json /app/appsettings.template.json | ||
| COPY --chmod=500 Settings/"${DB}"/run.sh /app/run.sh | ||
| COPY Settings/"${DB}"/log4net.config /app/log4net.txt | ||
|
|
||
| RUN apk --no-cache add curl=~8 unzip=~6 dos2unix=~7 bash=~5 gettext=~0 jq=~1 icu=~72 && \ | ||
| if [ "$DB" = "pgsql" ]; then apk --no-cache add postgresql13-client=~13; fi && \ | ||
| wget -nv -O /app/AdminApi.zip https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_apis/packaging/feeds/EdFi/nuget/packages/EdFi.Suite3.ODS.AdminApi/versions/${VERSION}/content && \ | ||
| RUN umask 0077 && \ | ||
| wget -nv -O /app/AdminApi.zip "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_apis/packaging/feeds/EdFi/nuget/packages/EdFi.Suite3.ODS.AdminApi/versions/${VERSION}/content" && \ | ||
| unzip /app/AdminApi.zip AdminApi/* -d /app/ && \ | ||
| cp -r /app/AdminApi/. /app/ && \ | ||
| rm -f /app/AdminApi.zip && \ | ||
|
|
@@ -31,8 +36,11 @@ RUN apk --no-cache add curl=~8 unzip=~6 dos2unix=~7 bash=~5 gettext=~0 jq=~1 icu | |
| dos2unix /app/*.sh && \ | ||
| dos2unix /app/log4net.config && \ | ||
| chmod 700 /app/*.sh -- ** && \ | ||
| rm -f /app/*.exe | ||
| rm -f /app/*.exe && \ | ||
| apk del unzip dos2unix curl && \ | ||
| chown -R edfi /app | ||
|
|
||
| EXPOSE 443 | ||
| USER edfi | ||
|
|
||
| ENTRYPOINT [ "/app/run.sh" ] | ||
Uh oh!
There was an error while loading. Please reload this page.