Skip to main content
added 3 characters in body
Source Link

There are two approchesapproach:

  1. Put al the files in the same directory where the you kept the Dockerfile. And And be in that persent directory, then execute the docker rundocker run command. You You cannot pass any relative path, all files should be in same folder.

  2. Put all the required files except the Dockerfile in a diffrent path. Use Use the "-f- -f- /PATH/PATH" option in docker rundocker run command from the current directory where your Dockerfile is present. Or you can give the full path of the docker file.


docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup < Dockerfile

docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup < Dockerfile

OR

docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup </root/GIT/otrs5/Dockerfile

docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup </root/GIT/otrs5/Dockerfile


Now the root pathpathe where the files are kept is /sys/fs/cgroup//sys/fs/cgroup/. Youyou can copy everything from here. Putput all your folders and file under this root path.


  • /root/GIT/otrs5/Dockerfile:

/root/GIT/otrs5/Dockerfile:

FROM php:7.2-apache

ADD . /tmp/fs/cgroup/.

FROM php:7.2-apache

With this last line, everything from your local ADD . /tmp/fs/cgroup/. #Every thing from your local /sys/fs/cgroup/* is copied to a new folder is copied to a new folder /tmp/fs/cgroup (if not present will be created) (if not present will be created)

 

There are two approches:

  1. Put al the files in the same directory where the you kept the Dockerfile. And be in that persent directory, then execute the docker run command. You cannot pass any relative path, all files should be in same folder.

  2. Put all the required files except the Dockerfile in a diffrent path. Use the -f- /PATH option in docker run command from the current directory where your Dockerfile is present. Or you can give the full path of the docker file.


docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup < Dockerfile

OR

docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup </root/GIT/otrs5/Dockerfile

Now the root path where the files are kept is /sys/fs/cgroup/. You can copy everything from here. Put all your folders and file under this root path.


  • /root/GIT/otrs5/Dockerfile:
FROM php:7.2-apache

ADD . /tmp/fs/cgroup/.

With this last line, everything from your local /sys/fs/cgroup/* is copied to a new folder /tmp/fs/cgroup (if not present will be created)

There are two approach:

  1. Put al the files in the same directory where the you kept the Dockerfile. And be in that persent directory, then execute the docker run command. You cannot pass any relative path, all files should be in same folder.

  2. Put all the required files except the Dockerfile in a diffrent path. Use the "-f- /PATH" option in docker run command from the current directory where your Dockerfile is present. Or you can give the full path of the docker file.


docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup < Dockerfile

OR

docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup </root/GIT/otrs5/Dockerfile


Now the root pathe where the files are kept is /sys/fs/cgroup/. you can copy everything from here. put all your folders and file under this root path.


/root/GIT/otrs5/Dockerfile:

FROM php:7.2-apache

ADD . /tmp/fs/cgroup/. #Every thing from your local /sys/fs/cgroup/* is copied to a new folder /tmp/fs/cgroup (if not present will be created)

 
Formatting
Source Link
AdminBee
  • 23.6k
  • 25
  • 55
  • 77

There are two approchapproches:

  1. Put al the files in the same directory where the you kept the Dockerfile. And And be in that persent directory, then execute the docker rundocker run command. You You cannot pass any relative path, all files should be in same folder.

  2. Put all the required files except the Dockerfile in a diffrent path. Use Use the "-f- /PATH"-f- /PATH option in docker rundocker run command from the current directory where your Dockerfile is present. Or you can give the full path of the docker file.


docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup < Dockerfile

docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup < Dockerfile

OR

docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup </root/GIT/otrs5/Dockerfile

docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup </root/GIT/otrs5/Dockerfile

Now the root pathepath where the files are kept is /sys/fs/cgroup//sys/fs/cgroup/. youYou can copy everything from here. putPut all your folders and file under this root path.


/root/GIT/otrs5/Dockerfile:

  • /root/GIT/otrs5/Dockerfile:

FROM php:7.2-apache

FROM php:7.2-apache

ADD . /tmp/fs/cgroup/.

With this last line, everything from your local ADD . /tmp/fs/cgroup/. #Every thing from your local /sys/fs/cgroup/* is copied to a new folder is copied to a new folder /tmp/fs/cgroup (if not present will be created) (if not present will be created)


 

There are two approch:

  1. Put al the files in the same directory where the you kept the Dockerfile. And be in that persent directory, then execute the docker run command. You cannot pass any relative path, all files should be in same folder.

  2. Put all the required files except the Dockerfile in a diffrent path. Use the "-f- /PATH" option in docker run command from the current directory where your Dockerfile is present. Or you can give the full path of the docker file.


docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup < Dockerfile

OR

docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup </root/GIT/otrs5/Dockerfile


Now the root pathe where the files are kept is /sys/fs/cgroup/. you can copy everything from here. put all your folders and file under this root path.


/root/GIT/otrs5/Dockerfile:

FROM php:7.2-apache

ADD . /tmp/fs/cgroup/. #Every thing from your local /sys/fs/cgroup/* is copied to a new folder /tmp/fs/cgroup (if not present will be created)


 

There are two approches:

  1. Put al the files in the same directory where the you kept the Dockerfile. And be in that persent directory, then execute the docker run command. You cannot pass any relative path, all files should be in same folder.

  2. Put all the required files except the Dockerfile in a diffrent path. Use the -f- /PATH option in docker run command from the current directory where your Dockerfile is present. Or you can give the full path of the docker file.


docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup < Dockerfile

OR

docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup </root/GIT/otrs5/Dockerfile

Now the root path where the files are kept is /sys/fs/cgroup/. You can copy everything from here. Put all your folders and file under this root path.


  • /root/GIT/otrs5/Dockerfile:
FROM php:7.2-apache

ADD . /tmp/fs/cgroup/.

With this last line, everything from your local /sys/fs/cgroup/* is copied to a new folder /tmp/fs/cgroup (if not present will be created)

Source Link

There are two approch:

  1. Put al the files in the same directory where the you kept the Dockerfile. And be in that persent directory, then execute the docker run command. You cannot pass any relative path, all files should be in same folder.

  2. Put all the required files except the Dockerfile in a diffrent path. Use the "-f- /PATH" option in docker run command from the current directory where your Dockerfile is present. Or you can give the full path of the docker file.


docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup < Dockerfile

OR

docker build -t docker.io/rohitbasu77/php:7.2-apache -f- /sys/fs/cgroup </root/GIT/otrs5/Dockerfile


Now the root pathe where the files are kept is /sys/fs/cgroup/. you can copy everything from here. put all your folders and file under this root path.


/root/GIT/otrs5/Dockerfile:

FROM php:7.2-apache

ADD . /tmp/fs/cgroup/. #Every thing from your local /sys/fs/cgroup/* is copied to a new folder /tmp/fs/cgroup (if not present will be created)