mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Windows: In container build check
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
d299bbfcc6
commit
4dbd612d47
1 changed files with 14 additions and 3 deletions
13
hack/make.sh
13
hack/make.sh
|
@ -29,9 +29,20 @@ export MAKEDIR="$SCRIPTDIR/make"
|
||||||
|
|
||||||
# We're a nice, sexy, little shell script, and people might try to run us;
|
# We're a nice, sexy, little shell script, and people might try to run us;
|
||||||
# but really, they shouldn't. We want to be in a container!
|
# but really, they shouldn't. We want to be in a container!
|
||||||
|
inContainer="AssumeSoInitially"
|
||||||
|
if [ "$(go env GOHOSTOS)" = 'windows' ]; then
|
||||||
|
if [ -n "$FROM_DOCKERFILE" ]; then
|
||||||
|
unset inContainer
|
||||||
|
fi
|
||||||
|
else
|
||||||
if [ "$PWD" != "/go/src/$DOCKER_PKG" ] || [ -z "$DOCKER_CROSSPLATFORMS" ]; then
|
if [ "$PWD" != "/go/src/$DOCKER_PKG" ] || [ -z "$DOCKER_CROSSPLATFORMS" ]; then
|
||||||
|
unset inContainer
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$inContainer" ]; then
|
||||||
{
|
{
|
||||||
echo "# WARNING! I don't seem to be running in the Docker container."
|
echo "# WARNING! I don't seem to be running in a Docker container."
|
||||||
echo "# The result of this command might be an incorrect build, and will not be"
|
echo "# The result of this command might be an incorrect build, and will not be"
|
||||||
echo "# officially supported."
|
echo "# officially supported."
|
||||||
echo "#"
|
echo "#"
|
||||||
|
|
Loading…
Reference in a new issue