Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

Modifying Dockerfile -- no result? #16

Closed
pbilinski opened this issue Apr 18, 2016 · 7 comments
Closed

Modifying Dockerfile -- no result? #16

pbilinski opened this issue Apr 18, 2016 · 7 comments

Comments

@pbilinski
Copy link

Hi,

I want to add own script to "run cli".

So I've:

  1. Created 'magento-permissions' script inside 7.0-cli/bin/
  2. Modified 7.0-cli/Dockerfile as below:

....
ADD bin/* /usr/local/bin/
added -> ADD bin/magento-permissions /usr/local/bin/magento-permissions
....

  1. Cleaned /var/lib/* docker cache and re-installed whole docker-engine to ensure that I have no-cached version

But after building from scratch (docker-compose run cli magento-installer, docker-compose up -d, docker-compose restart):

/usr/local/bin/docker-environment: line 49: exec: magento-permissions: not found

Could you help me: how to add own script to use inside "run cli"?

Thanks in advance,

@punkstar
Copy link
Contributor

Is magento-permissions executable?

Are you able to run the following?

docker-compose run cli bash
magento-permissions

What happens when you run?

docker-compose run cli bash
/usr/local/bin/magento-permissions

@pbilinski
Copy link
Author

pbilinski commented Apr 19, 2016

Yes, it's executable.

What's interesting -- there is no such file inside:

docker-compose run cli bash

Looks like it does not copy this script inside container :(

root@aaae0d9ee874:/# magento-
magento-command magento-installer

What's more, there is no error during building whole compose from scratch.

I attach my Dockerfile from 7.0-cli/ directory.

My Dockerfile

UPDATE: As you see -- I've also added some package below RUN apt-get-install. They are not available inside container too. Seems some "remote" dockerfile overrides my local Dockerfile?

@punkstar
Copy link
Contributor

Are you running docker-compose build?

@punkstar
Copy link
Contributor

What does your docker-compose.yml look like?

@pbilinski
Copy link
Author

Here is my: docker-compose.yml

No, I don't execute "docker-compose build".

@punkstar
Copy link
Contributor

If you are using a local Dockerfile with docker-compose then you'll need to edit your docker-compose.yml file to build: instead of using image:. If you're editing a Dockerfile then you'll need to build that image before using it.

I recommend you come back to these images once you've covered the basics of using and building with docker (https://docs.docker.com/engine/quickstart/) and then docker-compose (https://docs.docker.com/compose/overview/). Please reserve issues on this project to issues with this project.

@pbilinski
Copy link
Author

Thanks a lot! Now everything is clear.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants