ERROR: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0:

Hi while i try run XWIKI on docer compose I’m struggling with error:

“failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount1534147311/dockerfile: no such file or directory”

my docker compose file:

version: '2'
networks:
  bridge:
    driver: bridge
services:
  # The container that runs XWiki + Tomcat
  web:
    build:
      dockerfile: dockerfile //this dons't solve problem :(
    container_name: xwiki-postgres-tomcat-web
    depends_on:
      - db
    ports:
      - "8080:8080"
    # Default values defined in .env file.
    # The DB_USER/DB_PASSWORD/DB_DATABASE/DB_HOST variables are used in the hibernate.cfg.xml file.
    environment:
      - XWIKI_VERSION=10.4
      - DB_USER=xwiki
      - DB_PASSWORD=xwiki
      - DB_DATABASE=xwiki
      - DB_HOST=xwiki-postgres-db
    # Provide a name instead of an auto-generated id for xwiki data (the permanent directory in included in it)
    # configured in the Dockerfile, to make it simpler to identify in 'docker volume ls'.
    volumes:
      - /app/xwiki/xwiki:/usr/local/xwiki
    networks:
      - bridge
  # The container that runs the database (postgres)
  db:
    image: "postgres:13"
    container_name: xwiki-postgres-db
    volumes:
      - /app/xwiki/postgres:/var/lib/postgresql/data
    environment:
      - POSTGRES_ROOT_PASSWORD=xwiki
      - POSTGRES_PASSWORD=xwiki
      - POSTGRES_USER=xwiki
      - POSTGRES_DB=xwiki
      - POSTGRES_INITDB_ARGS="--encoding=UTF8"
    networks:
      - bridge
volumes:
  postgres-data: {}
  xwiki-data: {}

You can try these extra parameters -f .docker to your command, where you have to specify the docker build file.

I Don’t see any -f parameters in docker compose up documentation docker compose up | Docker Documentation

Docker compse up is recommended in documentation xwiki-docker/README.md at master · xwiki/xwiki-docker · GitHub

Did you name your file dockerfile and not Dockerfile?

I’m sorry, but I don’t understand your question. I’m quite a new user of docker.

in /app/xwiki
I have file: docker-compose.yml (content is higher)
and I trying to run in with docker compose up

I should edit other files?

In addition to the docker-compose.yml (configuration) file, you must have a Docker image with all dependencies. And it’s shouldn’t be dockerfile, but Dockerfile (with capital D at the start).

found it xwiki-docker/Dockerfile at 9494f0e950aee6750b349ed758a372e4b9407c40 · xwiki/xwiki-docker · GitHub

Do i need other file from here? xwiki-docker/14/postgres-tomcat at master · xwiki/xwiki-docker · GitHub

Can you show the directory’s content, from where you execute this command docker compose up?

First error form title is biten. Here is my configuration files from
gitlab xwiki-docker/14/postgres-tomcat/ (I can’t add link)

/app/xwiki contain
docker-compose.yml Dockerfile postgres13.tar.gz tomcat xwiki

/app/xwiki/xwiki contain
docker-entrypoint.sh hibernate.cfg.xml

/app/xwiki/tomcat contain
setenv.sh

I don’t understend what’s goin on. When i turin on this first time it look’s like there was dowlaned libreofice files from ubuntu serwers WTF, I’m using redhat linux. It’s container my home OS shuld’t affect app inside container. :frowning:

Shouldn’t the container contain everything they need?

[+] Building 2.0s (7/12)
 => [internal] load build definition from Dockerfile                                                                                                                                          0.2s
 => => transferring dockerfile: 32B                                                                                                                                                           0.0s
 => [internal] load .dockerignore                                                                                                                                                             0.2s
 => => transferring context: 2B                                                                                                                                                               0.0s
 => [internal] load metadata for docker.io/library/tomcat:9-jre11                                                                                                                             
0.5s
 => [1/8] FROM docker.io/library/tomcat:9-jre11@sha256:d898944c243c63fca9165ef6888ee7efdd1ffda1e8524ea958ef1d0035311dcb                                                                       0.0s
 => [internal] load build context                                                                                                                                                             0.2s
 => => transferring context: 178B                                                                                                                                                             0.0s
 => CACHED [2/8] RUN apt-get update &&   apt-get --no-install-recommends -y install     curl     libreoffice     unzip     procps     libpostgresql-jdbc-java &&   rm -rf /var/lib/apt/lists  0.0s
 => ERROR [3/8] RUN rm -rf /usr/local/tomcat/webapps/* &&   mkdir -p /usr/local/tomcat/temp &&   mkdir -p /usr/local/xwiki/data &&   curl -fSL "https://maven.xwiki.org/releases/org/xwiki/p  1.0s
------
 > [3/8] RUN rm -rf /usr/local/tomcat/webapps/* &&   mkdir -p /usr/local/tomcat/temp &&   mkdir -p /usr/local/xwiki/data &&   curl -fSL "https://maven.xwiki.org/releases/org/xwiki/platform/xwiki-platform-distribution-war/14.10/xwiki-platform-distribution-war-14.10.war" -o xwiki.war &&   echo "5e412e550c31255de1500631d9dcf46f7d746e6758717f63a90fa5c807429937 xwiki.war" | sha256sum -c - &&   unzip -d /usr/local/tomcat/webapps/ROOT xwiki.war &&   rm -f xwiki.war:
#0 0.560   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#0 0.560                                  Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
#0 0.765 curl: (60) SSL certificate problem: self-signed certificate in certificate chain
#0 0.765 More details here: https://curl.se/docs/sslcerts.html
#0 0.765
#0 0.765 curl failed to verify the legitimacy of the server and therefore could not
#0 0.765 establish a secure connection to it. To learn more about this situation and
#0 0.765 how to fix it, please visit the web page mentioned above.
------
failed to solve: executor failed running [/bin/sh -c rm -rf /usr/local/tomcat/webapps/* &&   mkdir -p /usr/local/tomcat/temp &&   mkdir -p /usr/local/xwiki/data &&   curl -fSL "${XWIKI_URL_PREFIX}/xwiki-platform-distribution-war-${XWIKI_VERSION}.war" -o xwiki.war &&   echo "$XWIKI_DOWNLOAD_SHA256 xwiki.war" | sha256sum -c - &&   unzip -d /usr/local/tomcat/webapps/ROOT xwiki.war &&   rm -f xwiki.war]: exit code: 60

From the error, you can see that the problem is with SSL certificate, try these commands before it and re-execute compose.

apt-get update
apt-get install ca-certificates