phundament / app

Dockerized Yii2 web application base
http://phundament.com
Other
310 stars 129 forks source link

Error parsing reference: local/phd/app: is not a valid repository/tag #207

Closed philippfrenzel closed 8 years ago

philippfrenzel commented 8 years ago

Fresh Setup on Windows 10 using docker hv8 on docker beta 1.12.x

Error parsing reference: local/phd/app: is not a valid repository/tag

Any ideas?

Thanks Philipp

schmunk42 commented 8 years ago

You need to set IMAGE_TAG or change this line

philippfrenzel commented 8 years ago

I did - but the only workaround for me was to move to the public php:5.6 docker :/ the local didn't work at all

schmunk42 commented 8 years ago

Which docker compose version do you have? Remove image completely as a workaround.

philippfrenzel commented 8 years ago

did so ;) looks like the following config makes it:

# phd - local development overrides

version: '2'
services:
  php:
    image: phundament/php-one:5.6-fpm-5.0.3
    volumes:
      - d:/DEVELOPMENT/ph-mystorage/.:/app
    environment:
      - YII_ENV=dev
      - YII_DEBUG=1
      - DB_PORT_3306_TCP_ADDR=db
      - DB_PORT_3306_TCP_PORT=3306
      - DB_ENV_MYSQL_ROOT_USER=root
      - DB_ENV_MYSQL_ROOT_PASSWORD=secretadmin
  nginx:
    ports:
      - '40090:80'
    volumes:
      - d:/DEVELOPMENT/ph-mystorage/.:/app
  appratchet:
    build: .
    volumes:
      - d:/DEVELOPMENT/ph-mystorage/.:/app'
    links:
      - 'db:percona'
    command: 'php yii websocket/run'
  appratchetcall:
    build: .
    volumes:
      - d:/DEVELOPMENT/ph-mystorage/.:/app'
    links:
      - 'db:percona'
    command: 'php yii phonesocket/run'

[Update: added formatting]

schmunk42 commented 8 years ago

But which docker-compose version are you running? You can also double-check with docker-compose config what's the final config output.

You're not building an image for the project now, instead you use host-volume for changes. This is fine for development, but it's not recommended for staging & production.

philippfrenzel commented 8 years ago

PS D:\DEVELOPMENT\ph-mystorage> docker-compo docker-compose version 1.8.0-rc2, build 634e docker-py version: 1.9.0-rc2 CPython version: 2.7.11 OpenSSL version: OpenSSL 1.0.2d 9 Jul 2015

schmunk42 commented 8 years ago

btw: I recently tried docker-compose directly on Windows, and I can't really recommend it. It still lacks interactive support for docker-compose exec & run which makes it pretty useless, IMHO.

philippfrenzel commented 8 years ago

well, I have the latest beta running - and the two commands work ;) and actually I have the whole project running ... 6 hours later ... so still the production environment makes me a bit scared as you mentioned we can't use it like this?!

schmunk42 commented 8 years ago

So you can run this on Windows?

docker-compose exec php bash

And you get an bash in the container, where you can run i.e. yii migrate?

philippfrenzel commented 8 years ago

docker exec -it container bash

works for me ;) and yes, i get a container to run "php yii migrate"

philippfrenzel commented 8 years ago

my fault, docker-compose is not working sorry!

schmunk42 commented 8 years ago

Yeah, docker exec is the current workaround I think. Or running from a Linux VM ;)

philippfrenzel commented 8 years ago

Thanks for the support ;)!