Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to fix "ERROR: No build stage in current context"
$ docker-compose up --build
Building xxx
ERROR: No build stage in current context
# you do something BEFORE the 'FROM' statement
COPY --chown=root:root /php /var/www/html/
FROM php:5.6.39-apache
# do something AFTER the 'FROM' statement
FROM php:5.6.39-apache
COPY --chown=root:root /php /var/www/html/

This comment has been minimized.

Copy link

@d0zingcat d0zingcat commented Apr 1, 2020

just to add one notice, the maintainer tag should not be placed above FROM clause, as the first statement must be FROM clause.

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