-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
omerlh
committed
Oct 22, 2019
1 parent
28212a7
commit d4379bb
Showing
21 changed files
with
130 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env | ||
|
||
ARG PROJECT_NAME=decrypt-api | ||
|
||
WORKDIR /app | ||
|
||
# Copy csproj and restore as distinct layers | ||
COPY ./src/$PROJECT_NAME/$PROJECT_NAME.csproj ./$PROJECT_NAME/$PROJECT_NAME.csproj | ||
COPY ./src/key-managment/key-managment.csproj ./key-managment/key-managment.csproj | ||
RUN dotnet restore $PROJECT_NAME/$PROJECT_NAME.csproj | ||
|
||
# Copy everything else and build | ||
COPY ./src/$PROJECT_NAME ./$PROJECT_NAME | ||
COPY ./src/key-managment ./key-managment | ||
RUN dotnet publish $PROJECT_NAME/$PROJECT_NAME.csproj -c Release -o ./obj/Docker/publish | ||
|
||
# Build runtime image | ||
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2.7-alpine AS release | ||
ARG PROJECT_NAME=decrypt-api | ||
ENV PROJECT_NAME_ENV=$PROJECT_NAME | ||
RUN addgroup dotnet && \ | ||
adduser -D -G dotnet -h /home/dotnet dotnet && \ | ||
apk --no-cache add ca-certificates wget && \ | ||
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \ | ||
wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.30-r0/glibc-2.30-r0.apk && \ | ||
apk add glibc-2.30-r0.apk && \ | ||
apk del wget | ||
|
||
|
||
USER dotnet | ||
WORKDIR /home/dotnet/app | ||
ENV ASPNETCORE_URLS=http://+:9999 | ||
COPY --from=build-env /app/$PROJECT_NAME/obj/Docker/publish . | ||
|
||
ENTRYPOINT dotnet $PROJECT_NAME_ENV.dll | ||
FROM mcr.microsoft.com/dotnet/core/sdk:3.0 AS build-env | ||
|
||
ARG PROJECT_NAME=decrypt-api | ||
|
||
WORKDIR /app | ||
|
||
# Copy csproj and restore as distinct layers | ||
COPY ./src/$PROJECT_NAME/$PROJECT_NAME.csproj ./$PROJECT_NAME/$PROJECT_NAME.csproj | ||
COPY ./src/key-managment/key-managment.csproj ./key-managment/key-managment.csproj | ||
RUN dotnet restore $PROJECT_NAME/$PROJECT_NAME.csproj | ||
|
||
# Copy everything else and build | ||
COPY ./src/$PROJECT_NAME ./$PROJECT_NAME | ||
COPY ./src/key-managment ./key-managment | ||
RUN dotnet publish $PROJECT_NAME/$PROJECT_NAME.csproj -c Release -o ./obj/Docker/publish | ||
|
||
# Build runtime image | ||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-alpine AS release | ||
ARG PROJECT_NAME=decrypt-api | ||
ENV PROJECT_NAME_ENV=$PROJECT_NAME | ||
RUN addgroup dotnet && \ | ||
adduser -D -G dotnet -h /home/dotnet dotnet && \ | ||
apk --no-cache add ca-certificates wget && \ | ||
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \ | ||
wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.30-r0/glibc-2.30-r0.apk && \ | ||
apk add glibc-2.30-r0.apk && \ | ||
apk del wget | ||
|
||
USER dotnet | ||
|
||
WORKDIR /home/dotnet/app | ||
ENV ASPNETCORE_URLS=http://+:9999 | ||
COPY --from=build-env /app/obj/Docker/publish . | ||
|
||
ENTRYPOINT dotnet $PROJECT_NAME_ENV.dll |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 0 additions & 74 deletions
74
src/encrypt-api/KubernetesAuthentication/KubernetesAuthenticationHandler.cs
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
src/encrypt-api/KubernetesAuthentication/KubernetesAuthenticationOptions.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.