Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

999
Visualizações
WSL2 docker-compose - unable to prepare context

I am using the Docker Engine running on WSL2 which is running on Windows 10 computer. My goal is to create a service using the Docker-compose that uses the php:fpm image and install the mysqli extension to it. Here is my docker-compose.yaml

version: "3"

services:
  nginx:
    image: "nginx"
    restart: 'always'
    ports:
      - '3030:80'
    volumes:
      - ./src:/src
      - ./config/site.conf:/etc/nginx/conf.d/default.conf
    networks:
        - code-network
  php:
    build:
      context: .
      dockerfile: Dockerfile
    image: php:fpm
    volumes:
        - ./src:/src
    networks:
        - code-network
  mariadb:
    image: "mariadb:10.3.24"
    restart: 'always'
    volumes:
      - "/var/lib/mysql/data:/data"
      - "/var/lib/mysql/logs:/logs"
      - /var/docker/mariadb/conf:/etc/mysql
    environment:
      MYSQL_ROOT_PASSWORD: "root"
      MYSQL_DATABASE: "T05CNCitk2020@"
      MYSQL_USER: "user"
      MYSQL_PASSWORD: "Heslo123"
    networks:
        - code-network

networks:
    code-network:
        driver: bridge

And here is my Dockerfile:

FROM php:fpm

RUN docker-php-ext-install mysqli

When I run the command docker-compose up --build which forces the container to rebuild. I ran into the following problem:

Building php
unable to prepare context: path "\\\\?\\\\\\wsl$\\Ubuntu-20.04\\home\\vendasky\\Projects\\sql-gui" not found
ERROR: Service 'php' failed to build : Build failed

I do not see the reason why the path should be wrong when all the files are located in the Linux subsystem. Any hints, how to solve this problem?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

are you runnning this with docker desktop for windows?

If thats the case try enabling the Docker Compose V2 option under the experimental settings. This should fix your problem.

over 4 years ago · Santiago Trujillo Relatório

0

Docker is unable to find the path to that project, map your ubuntu correctly so it can easily locate the project, that should fix your issue.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda