Created
February 16, 2019 22:53
-
-
Save pich4ya/4942fd2c854044500c90c8297a5ca994 to your computer and use it in GitHub Desktop.
How to fix "ERROR: No build stage in current context"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Problem: | |
$ docker-compose up --build | |
Building xxx | |
ERROR: No build stage in current context | |
Analysis: | |
Dockerfile | |
# you do something BEFORE the 'FROM' statement | |
COPY --chown=root:root /php /var/www/html/ | |
FROM php:5.6.39-apache | |
Solution: | |
# do something AFTER the 'FROM' statement | |
FROM php:5.6.39-apache | |
COPY --chown=root:root /php /var/www/html/ |
👍 bravo thank you!
@d0zingcat THANK YOU. This was making my build fail with no clear explanation.
❤
Also helpful for me!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
just to add one notice, the maintainer tag should not be placed above FROM clause, as the first statement must be FROM clause.