Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix case sensitivity and update base images for mariner #175

Merged
merged 6 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
20 changes: 13 additions & 7 deletions src/devhostagent.restorationjob/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build container
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine3.16 AS build-alpine
FROM mcr.microsoft.com/dotnet/sdk:6.0-cbl-mariner2.0 AS build

ARG Configuration=Release
ARG TelemetryType=TELEMETRY_DEVELOPMENT
Expand All @@ -18,17 +18,23 @@ ENV MINDARO_BUILD_NUMBER=${MindaroBuildNumber}
RUN dotnet publish -c ${Configuration} -o /output devhostAgent.restorationjob.csproj

# Final container
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine3.16 as final
FROM mcr.microsoft.com/dotnet/aspnet:6.0-cbl-mariner2.0 as final
gambtho marked this conversation as resolved.
Show resolved Hide resolved

# Setup common tools
COPY /build/setup-alpine-tools.sh .
RUN tdnf clean all && \
tdnf check-update && \
tdnf upgrade -y

RUN tdnf install -y \
procps \
bind-utils

COPY /build/setup-kubectl.sh .
RUN chmod +x ./setup-alpine-tools.sh ./setup-kubectl.sh \
&& ./setup-alpine-tools.sh \
RUN chmod +x ./setup-kubectl.sh \
&& ./setup-kubectl.sh \
&& rm -f ./setup-alpine-tools.sh ./setup-kubectl.sh
&& rm -f ./setup-kubectl.sh

WORKDIR /app
ENTRYPOINT ["/app/restorationjob"]

COPY --from=build-alpine /output /app
COPY --from=build /output /app
16 changes: 13 additions & 3 deletions src/devhostagent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Build container
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine3.16 AS build-alpine
FROM mcr.microsoft.com/dotnet/sdk:6.0-cbl-mariner2.0 AS build

RUN tdnf clean all && \
tdnf check-update && \
tdnf upgrade -y

ARG Configuration=Release
ARG TelemetryType=TELEMETRY_DEVELOPMENT
Expand All @@ -18,7 +22,13 @@ ENV MINDARO_BUILD_NUMBER=${MindaroBuildNumber}
RUN dotnet publish -c ${Configuration} -o /src/publish devhostAgent.csproj

# Final container
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine3.16 as final
gambtho marked this conversation as resolved.
Show resolved Hide resolved
FROM mcr.microsoft.com/dotnet/aspnet:6.0-cbl-mariner2.0 as final

RUN tdnf clean all && \
tdnf check-update && \
tdnf upgrade -y && \
tdnf install -y bind-utils

WORKDIR /src/devhostagent
COPY --from=build-alpine /src/publish /src/devhostagent
COPY --from=build /src/publish /src/devhostagent
ENTRYPOINT ["dotnet", "/src/devhostagent/Microsoft.BridgeToKubernetes.DevHostAgent.dll"]
18 changes: 10 additions & 8 deletions src/routingmanager/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build container
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine3.16 AS build-alpine
FROM mcr.microsoft.com/dotnet/sdk:6.0-cbl-mariner2.0 AS build

ARG Configuration=Release
ARG TelemetryType=TELEMETRY_DEVELOPMENT
Expand All @@ -18,20 +18,22 @@ ENV MINDARO_BUILD_NUMBER=${MindaroBuildNumber}
RUN dotnet publish -c ${Configuration} -o /src/publish

# Final container
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine3.16 as final
gambtho marked this conversation as resolved.
Show resolved Hide resolved
FROM mcr.microsoft.com/dotnet/aspnet:6.0-cbl-mariner2.0 as final

# Setup common tools
COPY /build/setup-alpine-tools.sh .
RUN chmod +x ./setup-alpine-tools.sh \
&& ./setup-alpine-tools.sh \
&& rm -f ./setup-alpine-tools.sh
RUN tdnf clean all && \
tdnf check-update && \
tdnf upgrade -y

RUN tdnf install -y \
procps \
bind-utils

# Setup kubectl
COPY /build/setup-kubectl.sh .
RUN chmod +x ./setup-kubectl.sh \
&& ./setup-kubectl.sh \
&& rm -f ./setup-kubectl.sh

WORKDIR /src/routingmanager
COPY --from=build-alpine /src/publish /src/routingmanager
COPY --from=build /src/publish /src/routingmanager
ENTRYPOINT ["dotnet", "/src/routingmanager/Microsoft.BridgeToKubernetes.RoutingManager.dll"]