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

Update dockerfile adding rust toolchain #215

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 0 additions & 4 deletions backend/Application/Application.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<Version>1.9.0</Version>
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
<IsOSX Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsOSX>
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
<RunRustBuild>true</RunRustBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
10 changes: 6 additions & 4 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ WORKDIR /app
EXPOSE 5000

FROM mcr.microsoft.com/dotnet/sdk:6.0-bookworm-slim AS publish
RUN apt-get update && apt-get install -y build-essential
# Installing Rust to build Concordium.Sdk.
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.80 --profile minimal -y
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /src
COPY Application/ Application/
COPY DatabaseScripts/ DatabaseScripts/
WORKDIR "/src/Application"
RUN dotnet publish "Application.csproj" -c Release -o /app/publish -p:RunRustBuild=false
COPY . .
RUN dotnet publish Application -c Release -o /app/publish

FROM base AS final
# Install 'ca-certificates' for supporting HTTPS.
Expand Down
Loading