I'm using a Windows system with WSL and Ubuntu 20.4, and trying to use Laravel Sail with Docker Desktop. However, I'm encountering errors. Can someone please help me troubleshoot this issue?
alok@DESKTOP-D2T227B:/mnt/c/Users/alokp/Music/full-version$ sail up
./.env: line 7: $'\r': command not found
./.env: line 11: $'\r': command not found
./.env: line 18: $'\r': command not found
./.env: line 25: $'\r': command not found
./.env: line 27: $'\r': command not found
./.env: line 31: $'\r': command not found
./.env: line 40: $'\r': command not found
./.env: line 46: $'\r': command not found
./.env: line 51: $'\r': command not found
[+] Running 0/1
⠿ laravel.test Warning 0.5s
[+] Building 3.6s (8/15)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:21.10 1.3s
=> [internal] load build context 0.0s
=> => transferring context: 99B 0.0s
=> [ 1/11] FROM docker.io/library/ubuntu:21.10@sha256:ff46b78279f207db3b8e57e20dee7cecef3567d09489369d80591f150f9c8154 0.0s
=> CACHED [ 2/11] WORKDIR /var/www/html 0.0s
=> CACHED [ 3/11] RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone 0.0s
=> ERROR [ 4/11] RUN apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 2.3s
------
> [ 4/11] RUN apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 && mkdir -p
~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu impish main" > /etc/apt/sources.list.d/ppa_ondrej_php.list && apt-get update && apt-get install -y php8.1-cli php8.1 php8.1-pgsql php8.1-sqlite3 php8.1-gd php8.1-curl php8.1-imap php8.1-mysql php8.1-mbstring php8.1-xml php8.1-zip php8.1-bcmath php8.1-soap php8.1-intl php8.1-readline php8.1-ldap php8.1-msgpack php8.1-igbinary php8.1-redis php8.1-swoole php8.1-memcached php8.1-pcov php8.1-xdebug && php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs && npm install -g npm && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable
main" > /etc/apt/sources.list.d/yarn.list && apt-get update && apt-get install -y yarn && apt-get install -y mysql-client && apt-get install -y postgresql-client && apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*:
#0 0.964 Ign:1 http://archive.ubuntu.com/ubuntu impish InRelease
#0 0.996 Ign:2 http://security.ubuntu.com/ubuntu impish-security InRelease
#0 1.219 Ign:3 http://archive.ubuntu.com/ubuntu impish-updates InRelease
#0 1.266 Err:4 http://security.ubuntu.com/ubuntu impish-security Release
#0 1.266 404 Not Found [IP: 91.189.91.38 80]
#0 1.475 Ign:5 http://archive.ubuntu.com/ubuntu impish-backports InRelease
#0 1.742 Err:6 http://archive.ubuntu.com/ubuntu impish Release
#0 1.742 404 Not Found [IP: 91.189.91.39 80]
#0 1.997 Err:7 http://archive.ubuntu.com/ubuntu impish-updates Release
#0 1.997 404 Not Found [IP: 91.189.91.39 80]
#0 2.252 Err:8 http://archive.ubuntu.com/ubuntu impish-backports Release
#0 2.252 404 Not Found [IP: 91.189.91.39 80]
#0 2.254 Reading package lists...
#0 2.263 E: The repository 'http://security.ubuntu.com/ubuntu impish-security Release' does not have a Release file.
#0 2.263 E: The repository 'http://archive.ubuntu.com/ubuntu impish Release' does not have a Release file.
#0 2.263 E: The repository 'http://archive.ubuntu.com/ubuntu impish-updates Release' does not have a Release file.
#0 2.263 E: The repository 'http://archive.ubuntu.com/ubuntu impish-backports Release' does not have a Release file.
------
failed to solve: executor failed running [/bin/sh -c apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 && mkdir -p ~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu impish main" > /etc/apt/sources.list.d/ppa_ondrej_php.list && apt-get update && apt-get install -y php8.1-cli php8.1 php8.1-pgsql php8.1-sqlite3 php8.1-gd php8.1-curl php8.1-imap php8.1-mysql php8.1-mbstring php8.1-xml php8.1-zip php8.1-bcmath php8.1-soap php8.1-intl php8.1-readline php8.1-ldap php8.1-msgpack php8.1-igbinary php8.1-redis php8.1-swoole php8.1-memcached php8.1-pcov php8.1-xdebug && php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - && apt-get install -y nodejs && npm install -g npm && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && apt-get update && apt-get install -y yarn && apt-get install -y mysql-client && apt-get install -y postgresql-client && apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*]: exit code: 100
It looks like the issue is related to the Ubuntu version you are using. The error message indicates that the repositories for the version you are using (impish) are not found.
You can try updating your Ubuntu version to a more recent one (e.g. focal) and then running sail up again. To do this, you can run the following commands: