0

I have this docker compose:

myapp:
    image: myapp_test_1
    build:
      context: ../py/myapp
      dockerfile: ../../Docker/Dockerfile
    restart: always

and I want in my Dockerfile performe this:

COPY ../../Docker/prestart.sh .

But I receive this message error:

failed to solve: rpc error: code = Unknown desc = failed to compute cache key: "/Docker/prestart.sh" not found: not found

My structure project:

.
├── Docker
│   ├── Dockerfile
│   ├── xxx
│   ├── xxx
│   ├── xxx
│   ├── docker-compose.yml
│   ├── xxx
│   ├── xxx
│   ├── prestart.sh
│   ├── xxx
│   ├── xxx
│   ├── xxx
│   └── xxx
|
├── java
│   └── xxx
├── xxx
│   ├── xxx
│   ├── xxx
│   └── xxx
└── py
    ├── xxx
    ├── myapp
    ├── xxx
    ├── xxx
    ├── xxx
    ├── xxx
    ├── xxx
    ├── xxx
    ├── xxx
    ├── xxx
    └── xxx

xxx stands for other folders and files not implicated in this

I want to use only one prestart.sh that is in Docker folder and I don't want to copy it in the myapp folder, how can I reach this goal?

badr
  • 94
  • 1
  • 5

0 Answers0