GoogleCloudPlatform / marketplace-k8s-app-example

Apache License 2.0
23 stars 19 forks source link

Wordpress: `sudo make app/install` fails with "invalid tag" error #85

Closed NimishC closed 6 years ago

NimishC commented 6 years ago

The make app/install command fails after building the deployer_envsubst image. It might be because the APP_DEPLOYER_IMAGE variable is getting set to gcr.io//wordpress/deployer:latest (with double slash)

Output:

Successfully tagged gcr.io/google-marketplace-tools/k8s/deployer_envsubst:latest
mkdir -p .build/var
APP_DEPLOYER_IMAGE has been updated.
  old value: 
  new value: gcr.io//wordpress/deployer:latest
REGISTRY has been updated.
  old value: 
  new value: gcr.io/
TAG has been updated.
  old value: 
  new value: latest
mkdir -p ".build/wordpress"
echo -e "\n\033[93m\033[1mBuilding .build/wordpress/deployer\033[0m\n"

Building .build/wordpress/deployer

docker build \
        --build-arg REGISTRY="gcr.io//wordpress" \
        --build-arg TAG="latest" \
        --tag "gcr.io//wordpress/deployer:latest" \
        -f deployer/Dockerfile \
        .
invalid argument "gcr.io//wordpress/deployer:latest" for "-t, --tag" flag: invalid reference format
See 'docker build --help'.
Makefile:65: recipe for target '.build/wordpress/deployer' failed
make: *** [.build/wordpress/deployer] Error 125
vcanaa commented 6 years ago

@NimishC - Can you check which project is set using the gcloud command? gcloud config list If you have no project set, you can do so by running: gcloud config set project If that doesn't resolve your problem I suggest you also run: make clean If you still see the same issue, we will have to investigate further.

NimishC commented 6 years ago

make clean seems to have resolved the issue. Thanks!