Reputation: 21
I am facing this error while trying to build my docker image for my project. What could be the possible reasons? I am doing the build in VS Code terminal. I have attached the image of the error logs.
ERROR: failed to solve: error from sender: context canceled
FROM node:21-bullseye as build
RUN apt-get update && \
apt-get install -y git bash maven openjdk-11-jdk
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y install --no-install-recommends \
software-properties-common \
libxkbfile-dev \
libsecret-1-dev \
build-essential libssl-dev
WORKDIR /home/theia
this is the relevant part of my dockerfile.
I was expecting a successful build but this error has been nagging
Upvotes: 2
Views: 1640
Reputation: 1
I had the same problem with PyCharm and Dockerfile as well, in my case adding .idea/ to .dockerignore, solved the problem.
Upvotes: 0
Reputation: 529
I had the same problem with PyCharm. Closing it and using terminal to build the image worked for me.
Upvotes: 0