nestybox / nestybox/sysbox

In the container which is running on sysbox, the cmd “dotnet build” failed

Open
#545 2 comments 0 reactions 1 assignee View on GitHub

@rodnymolina is already working on this.

Since May 10, 2022.

bug
Dominant language
Shell
Stars
3.9k
Forks
230
Avg merge
7h 48m
Merged PRs (30d)
3

Description

I have some trobules about dotnet sdk build issue in the docker container base on sysbox, here is my situation

  1. I build an images named sysbox here is dockerfile
    FROM ubuntu:bionic

Systemd installation

RUN apt-get update &&
apt-get install -y --no-install-recommends
systemd
systemd-sysv
libsystemd0
ca-certificates
dbus
iptables
iproute2
kmod
locales
sudo
git
wget
udev &&

# Prevents journald from reading kernel messages from /dev/kmsg
echo "ReadKMsg=no" >> /etc/systemd/journald.conf &&

# Housekeeping
apt-get clean -y &&
rm -rf
/var/cache/debconf/*
/var/lib/apt/lists/*
/var/log/*
/tmp/*
/var/tmp/*
/usr/share/doc/*
/usr/share/man/*
/usr/share/local/* &&

# Create default 'admin/admin' user
useradd --create-home --shell /bin/bash admin && echo "admin:admin" | chpasswd && adduser admin sudo

Sshd install

RUN apt-get update && apt-get install --no-install-recommends -y
openssh-server &&
mkdir /home/admin/.ssh &&
chown admin:admin /home/admin/.ssh

Docker install

RUN apt-get update && apt-get install --no-install-recommends -y
apt-transport-https
ca-certificates
curl
gnupg-agent
software-properties-common &&

curl -fsSL https://download.docker.com/linux/ubuntu/gpg
| apt-key add - &&

apt-key fingerprint 0EBFCD88 &&

add-apt-repository
"deb [arch=amd64] https://download.docker.com/linux/ubuntu
$(lsb_release -cs)
stable" &&

apt-get update && apt-get install --no-install-recommends -y
docker-ce=5:19.03.123-0ubuntu-bionic
docker-ce-cli=5:19.03.123-0ubuntu-bionic
containerd.io=1.2.13-2 &&

# Housekeeping
apt-get clean -y &&
rm -rf
/var/cache/debconf/*
/var/lib/apt/lists/*
/var/log/*
/tmp/*
/var/tmp/*
/usr/share/doc/*
/usr/share/man/*
/usr/share/local/* &&

# Add user "admin" to the Docker group
usermod -a -G docker admin

#Powershell install
RUN apt-get update
RUN apt-get install -y wget apt-transport-https software-properties-common
RUN wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN apt-get update
RUN apt-get install -y powershell
RUN rm -rf packages-microsoft-prod.deb

#Dapr install
RUN wget -q https://raw.githubusercontent.com/dapr/cli/master/install/install.sh -O - | /bin/bash
RUN dapr

RUN dapr init

EXPOSE 22 8080 443 6000 6001 6002 3600 3601 3602 4000 5000

Set systemd as entrypoint.

ENTRYPOINT [ "/sbin/init", "--log-level=err" ]

  1. I build an image extend sysbox here is dockerfile and named testdotnet
    FROM sysbox

#Dotnet 6 install

RUN wget https://packages.microsoft.com/config/ubuntu/21.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN rm -rf packages-microsoft-prod.deb

RUN sudo apt-get update && \
sudo apt-get install -y apt-transport-https &&
sudo apt-get update &&
sudo apt-get install -y dotnet-sdk-6.0

ENV HOME=/home/admin
ENV DOTNET_ROOT=$HOME/dotnet
ENV PATH=$HOME/dotnet:$PATH
ENV PATH=$HOME/.dotnet/tools:$PATH
ENV DOTNET_CLI_TELEMETRY_OPTOUT=false

  1. after I excutetd “sudo docker run --runtime=sysbox-runc -it --rm -P --hostname=syscont test” and ssh in the container testdotnet
  2. I excuted dotnet new console -o myapp and cd myapp
  3. when I excuted dotnet build in myapp,it show these message
    image,but if I run the cmd like this “sudo docker run -d -p 8080:80 testdotnet" it wouldn't appear this error

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.