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

arm64 container #36

Open
RazorDarkAMG opened this issue May 21, 2021 · 1 comment
Open

arm64 container #36

RazorDarkAMG opened this issue May 21, 2021 · 1 comment

Comments

@RazorDarkAMG
Copy link

Hi,

is it possible to create the container in arm64 for raspberry pi users,

Thank you !

@jaw3l
Copy link

jaw3l commented Feb 25, 2022

I don't know If you have already figured it out but this does work for me :) Probably there is better way to do it.

FROM lsiobase/ubuntu:bionic AS base

WORKDIR /app

EXPOSE 5000

FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build
WORKDIR /src
COPY ["Deemixrr/", "Deemixrr/"]
RUN dotnet restore "Deemixrr/Deemixrr.csproj"
COPY . .
WORKDIR "/src/Deemixrr"
RUN dotnet build "Deemixrr.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "Deemixrr.csproj" -c Release -o /app/publish

FROM base AS final

WORKDIR /app
COPY --from=publish /app/publish .

RUN apt-get update && \
    apt-get install -y apt-transport-https python3 python3-pip curl apt-utils wget unzip

# Install dotnet runtime

WORKDIR /dotnet

RUN curl -Lo dotnet.tar.gz https://download.visualstudio.microsoft.com/download/pr/86fc75ca-8ba0-4d49-b505-3a7e10b2e26d/dde7cd87f4ba2f07c5249e779c0fc0ff/dotnet-runtime-5.0.14-linux-arm64.tar.gz && \
    mkdir dotnet && \
    tar -C dotnet -xf dotnet.tar.gz && \
    rm dotnet.tar.gz

ENV PATH="/dotnet/dotnet:${PATH}"

# Install dotnet sdk

RUN curl -Lo dotnet-sdk.tar.gz https://download.visualstudio.microsoft.com/download/pr/3c0011b6-9ec7-484e-9485-56512752c5b5/06c6163c7481da86a15811355ba8beaa/dotnet-sdk-5.0.405-linux-arm64.tar.gz && \
    mkdir dotnet-sdk && \
    tar -C dotnet-sdk -xf dotnet-sdk.tar.gz && \
    rm dotnet-sdk.tar.gz

ENV PATH="/dotnet/dotnet-sdk:${PATH}"
ENV DOTNET_ROOT="/dotnet/dotnet-sdk:${PATH}"

RUN dotnet --info && \
    dotnet --version

RUN curl https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb --output packages-microsoft-prod.deb && \
    dpkg -i packages-microsoft-prod.deb

COPY /etc /etc

ENTRYPOINT ["/init"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants