Reputation: 23
I'm trying to do a devcontainer setup with vscode on linux (fedora 37) but I always get the error you can see in the image link below
failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF
These are my configuration files:
Dockerfile:
FROM php:7.4-apache
RUN apt-get update && apt-get install -y \
git \
unzip \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libzip-dev \
libicu-dev \
libc-client-dev \
libkrb5-dev \
libmagickwand-dev && \
docker-php-ext-configure gd --with-freetype --with-jpeg=/usr/include/ --enable-gd && \
docker-php-ext-install -j$(nproc) gd && \
docker-php-ext-configure intl && \
PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
docker-php-ext-install -j$(nproc) imap && \
docker-php-ext-install zip && \
docker-php-ext-install mysqli && \
docker-php-ext-install pdo_mysql && \
docker-php-ext-install intl && \
docker-php-ext-install calendar && \
docker-php-ext-install exif && \
docker-php-ext-install gettext && \
docker-php-ext-install sockets && \
yes '' | pecl install imagick && docker-php-ext-enable imagick && \
a2enmod rewrite && \
a2enmod headers && \
a2enmod cgi && \
a2enmod proxy_fcgi && \
apt-get remove -y libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libzip-dev \
libicu-dev \
libc-client-dev \
libkrb5-dev \
libmagickwand-dev && \
apt-get clean -y
RUN sed -i -e '/.* rights="none".*pattern="PDF"/s/ rights="none"/ rights="read|write"/g' /etc/ImageMagick-6/policy.xml
COPY --from=composer:2.5 /usr/bin/composer /usr/bin/composer
devcontainer.json:
{
"name": "PHP",
"build": {
"context": ".",
"dockerfile": "Dockerfile"
},
"forwardPorts": [ "8000:80" ],
"customizations": {
"vscode": {
"extensions": [
"donjayamanne.git-extension-pack",
"waderyan.gitblame",
"ms-azuretools.vscode-docker",
"p1c2u.docker-compose",
"ms-vscode-remote.remote-ssh",
"TabNine.tabnine-vscode",
"DEVSENSE.phptools-vscode",
"xdebug.php-pack"
]
}
},
"workspaceMount":"source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached",
"workspaceFolder": "/workspace",
}
Thank you very much for the help
The information I found on the internet says that the problem is docker, but docker is fine.
I run my docker build and it finishes successfully, but devconteiner throws the error every time
Upvotes: 2
Views: 4697
Reputation: 2688
This is most likely related to a bug in Docker stack, introduced in recent Docker 23 (check your version to make sure the below applies to you).
VSC issue: https://github.com/microsoft/vscode-remote-release/issues/7958. There you can find a workaround and links to upstream trackers that deal with the issue directly.
I can confirm the workaround of disabling BUILDKIT_INLINE_CACHE works, that is setting the following in .devcontainer.json allows for VSC to start:
{
"build": {
"args": {
"BUILDKIT_INLINE_CACHE": "0"
}
}
}
The issue itself is supposed to be fixed already, but may not have landed in your distribution yet.
Upvotes: 2