Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.dockerignore with absolute paths doesn't work #5672

Closed
glensc opened this issue Feb 12, 2018 · 4 comments
Closed

.dockerignore with absolute paths doesn't work #5672

glensc opened this issue Feb 12, 2018 · 4 comments

Comments

@glensc
Copy link

glensc commented Feb 12, 2018

with given .dockerignore:


# https://docs.docker.com/engine/reference/builder/#dockerignore-file
/*
!/bootstrap.php
!/composer.*
!/src
!/vendor
!/web

you can see that docker cli procesess normally while docker-compose does not:

$ docker --version
Docker version 17.12.0-ce, build c97c6d6

$ docker build .
Sending build context to Docker daemon  18.01MB
Step 1/12 : FROM composer:1.6 AS build
 ---> 2f3f191337e9
Step 2/12 : COPY . /app
 ---> 51e70e31d7b7
Step 3/12 : WORKDIR /app
Removing intermediate container 195eb1157938
 ---> dbf19d487c8a
Step 4/12 : RUN composer install --no-dev -a
 ---> Running in 35df8ef9860a
Loading composer repositories with package information
...
$ docker-compose --version
docker-compose version 1.18.0, build 8dd22a9

$ docker-compose build
Building app
Step 1/12 : FROM composer:1.6 AS build
 ---> 2f3f191337e9
Step 2/12 : COPY . /app
 ---> Using cache
 ---> e4a4db6fbad5
Step 3/12 : WORKDIR /app
 ---> Using cache
 ---> 736fd5af09ae
Step 4/12 : RUN composer install --no-dev -a
 ---> Running in 197839d9f942
Composer could not find a composer.json file in /app
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
ERROR: Service 'app' failed to build: The command '/bin/sh -c composer install --no-dev -a' returned a non-zero code: 1
glensc added a commit to glensc/slack-unfurl that referenced this issue Feb 12, 2018
note: the build does not work due docker-compose bugs:
docker/compose#5672
@shin-
Copy link

shin- commented Feb 12, 2018

I'll look into it, thanks for the report.

@glensc
Copy link
Author

glensc commented Feb 12, 2018

thanks ahead!

@bscheshirwork
Copy link

@glensc all is ok now?

@shin- shin- added this to the 1.20.0 milestone Feb 22, 2018
@glensc
Copy link
Author

glensc commented Feb 26, 2018

@bscheshirwork will wait for 1.20.0 release and report then (create new issue or reopen this) if still broken. thanks.

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

No branches or pull requests

3 participants