facing issue while running docker container from docker-compose.yml file

yogs007

This is error i am gettingstrong text

Getting this :- error while reading the file "./inputdata": open ./inputdata: no such file or directory is coming when i am running docker container using docker-compose.yml file

How i create ./inputdata file for the same in docker-compose.yml file, I am new to docker please help for the same

This is my docker-compose.yml file

This is my docker-compose.yml file

yogs007

Hi sorry for the late reply, The issue occurred because the custom image I'm using need a "inputdata file" with some index based entries in it like (1, 45) (2, 65) and so on before running the container , so I add/map/copy that file i.e inputdata file in my docker-compose.yml , See below for the same.

*mycsvserver:
image: "MY_IMAGE_NAME"
container_name: csvserver_container
ports:
- 9393:9300
volumes:
- ./inputFile:/csvserver/inputdata*

OR we can run that container using below command :-

docker run -d -v /home/testuser/inputFile:/csvserver/inputdata <MY_IMAGE_NAME>

Note: Here we have created a inputFile with some indexed based entries in it and map that volume with our image with inputdata file.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From

Get docker-compose.yml file location from running container?

From Dev

install packages from docker-compose.yml into docker container

From Dev

docker-compose recreates a running container despite having a different container_name in the docker-compose.yml

From Dev

Create service in docker-compose.yml base on running container

From Dev

How to specify a docker container database to a app running in docker with docker-compose.yml?

From Dev

How to Build & Push Container from docker-compose.ci.build.yml File

From Dev

Memory resources for a docker container running from docker-compose

From Dev

Bash: get a list of container names from docker-compose.yml

From Dev

issue with the docker compose file

From Java

How to create docker-compose.yml file while using jib?

From Dev

Rails image not running from docker-compose.yml

From Dev

Error creating database while running container with docker compose

From Dev

Facing issue while starting Controller in Docker

From Dev

Docker-compose running container

From

Docker Compose keep container running

From Dev

Dockerfile COPY from host to container works, but when docker-compose.yml uses volume, the file in container not visible to host

From

Auto remove container with docker-compose.yml

From Dev

Adding a container to an existing docker-compose.yml

From

Pass a variable to a Dockerfile from a docker-compose.yml file

From Dev

Docker: How to connect to a kafka container which is not defined in docker-compose.yml file

From Dev

Mura CMS database connectivity issue inside docker using docker-compose.yml file

From Dev

How to update configuration file (.env file) while running docker container

From Dev

Error while running docker container

From Dev

How to compose docker-compose.yml so i can access deamon's container from php?

From Mysql

Docker Runs MysQL Container With Tables On Terminal, But Not With docker-compose.yml

From Dev

Wait for a docker container to be ready with command in docker-compose.yml

From Dev

Moving file from docker to local while inside docker container

From Dev

How to copy some data from one container to another container by docker-compose.yml

From Java

Writing to a file in a folder while running a JAR on Docker Container results in FileNotFoundException

Related Related

  1. 1

    Get docker-compose.yml file location from running container?

  2. 2

    install packages from docker-compose.yml into docker container

  3. 3

    docker-compose recreates a running container despite having a different container_name in the docker-compose.yml

  4. 4

    Create service in docker-compose.yml base on running container

  5. 5

    How to specify a docker container database to a app running in docker with docker-compose.yml?

  6. 6

    How to Build & Push Container from docker-compose.ci.build.yml File

  7. 7

    Memory resources for a docker container running from docker-compose

  8. 8

    Bash: get a list of container names from docker-compose.yml

  9. 9

    issue with the docker compose file

  10. 10

    How to create docker-compose.yml file while using jib?

  11. 11

    Rails image not running from docker-compose.yml

  12. 12

    Error creating database while running container with docker compose

  13. 13

    Facing issue while starting Controller in Docker

  14. 14

    Docker-compose running container

  15. 15

    Docker Compose keep container running

  16. 16

    Dockerfile COPY from host to container works, but when docker-compose.yml uses volume, the file in container not visible to host

  17. 17

    Auto remove container with docker-compose.yml

  18. 18

    Adding a container to an existing docker-compose.yml

  19. 19

    Pass a variable to a Dockerfile from a docker-compose.yml file

  20. 20

    Docker: How to connect to a kafka container which is not defined in docker-compose.yml file

  21. 21

    Mura CMS database connectivity issue inside docker using docker-compose.yml file

  22. 22

    How to update configuration file (.env file) while running docker container

  23. 23

    Error while running docker container

  24. 24

    How to compose docker-compose.yml so i can access deamon's container from php?

  25. 25

    Docker Runs MysQL Container With Tables On Terminal, But Not With docker-compose.yml

  26. 26

    Wait for a docker container to be ready with command in docker-compose.yml

  27. 27

    Moving file from docker to local while inside docker container

  28. 28

    How to copy some data from one container to another container by docker-compose.yml

  29. 29

    Writing to a file in a folder while running a JAR on Docker Container results in FileNotFoundException

HotTag

Archive