Skip to content

Commit

Permalink
Merge pull request #484 from yamada28go/work/fix_armBuild
Browse files Browse the repository at this point in the history
x86環境以外でDockerイメージをビルドできない問題を修正
  • Loading branch information
pierre3 authored Aug 23, 2023
2 parents fef4b03 + 5ce22d0 commit 514e16e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions Implem.CodeDefiner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base
RUN apt-get update && apt-get install -y curl

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["Implem.CodeDefiner/Implem.CodeDefiner.csproj", "Implem.CodeDefiner/"]
Expand All @@ -21,10 +19,10 @@ RUN dotnet build "Implem.CodeDefiner/Implem.CodeDefiner.csproj" -c Release -o /a
RUN dotnet build "Implem.Pleasanter/Implem.Pleasanter.csproj" -c Release -o /app/build/Implem.Pleasanter

FROM build AS publish
RUN apt-get update && apt-get install -y jq
RUN dotnet publish "Implem.CodeDefiner/Implem.CodeDefiner.csproj" -c Release -o /app/publish/Implem.CodeDefiner
RUN dotnet publish "Implem.Pleasanter/Implem.Pleasanter.csproj" -c Release -o /app/publish/Implem.Pleasanter
RUN curl -o /usr/bin/jq -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 && chmod +x /usr/bin/jq && \
cat Implem.Pleasanter/App_Data/Parameters/Rds.json \
RUN cat Implem.Pleasanter/App_Data/Parameters/Rds.json \
| jq '.Dbms|="PostgreSQL" | .SaConnectionString|=null | .OwnerConnectionString|=null | .UserConnectionString|=null' \
> /app/publish/Implem.Pleasanter/App_Data/Parameters/Rds.json

Expand Down
6 changes: 3 additions & 3 deletions Implem.Pleasanter/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
RUN apt-get update && apt-get install -y libgdiplus curl
RUN apt-get update && apt-get install -y libgdiplus

WORKDIR /app
EXPOSE 80
Expand All @@ -24,9 +24,9 @@ WORKDIR "/src/Implem.Pleasanter"
RUN dotnet build "Implem.Pleasanter.csproj" -c Release -o /app/build

FROM build AS publish
RUN apt-get update && apt-get install -y jq
RUN dotnet publish "Implem.Pleasanter.csproj" -c Release -o /app/publish
RUN curl -o /usr/bin/jq -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 && chmod +x /usr/bin/jq && \
cat App_Data/Parameters/Rds.json \
RUN cat App_Data/Parameters/Rds.json \
| jq '.Dbms|="PostgreSQL" | .SaConnectionString|=null | .OwnerConnectionString|=null | .UserConnectionString|=null' \
> /app/publish/App_Data/Parameters/Rds.json

Expand Down

0 comments on commit 514e16e

Please sign in to comment.