Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some composer commands have no effect or break docker-compose #26

Open
pr1ntr opened this issue Nov 9, 2018 · 0 comments
Open

some composer commands have no effect or break docker-compose #26

pr1ntr opened this issue Nov 9, 2018 · 0 comments

Comments

@pr1ntr
Copy link

pr1ntr commented Nov 9, 2018

here is my dockerfile (edited version of yours)


MAINTAINER WILDLIFE "[email protected]"



# Remove existing webroot, configure PHP session handler for Redis, install postgresql-client (pg_dump)
RUN rm -rf /usr/share/nginx/* && \
sed -i -e "s/memory_limit\s*=\s*.*/memory_limit = 256M/g" ${php_conf} && \
sed -i -e "s/session.save_handler\s*=\s*.*/session.save_handler = redis/g" ${php_conf} && \
sed -i -e "s/;session.save_path\s*=\s*.*/session.save_path = \"\${REDIS_PORT_6379_TCP}\"/g" ${php_conf} && \
wget -q -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' && \
apt-get update && \
apt-get install -y postgresql-client-10 net-tools php7.2-xdebug



# Create Craft project

WORKDIR /usr/share/nginx/

RUN composer create-project craftcms/craft .


VOLUME /usr/share/nginx/modules
VOLUME /usr/share/nginx/plugins



# Install the yii2-redis library
RUN composer require --prefer-dist yiisoft/yii2-redis
# THIS DOES NOTHING
RUN composer config repositories.buildhooks '{"type": "path", "url": "./plugins/wildlife/buildhooks"}'
# THIS BREAKS THE BUILD
RUN composer require wildlife/buildhooks

# Add default craft cms nginx config
ADD ./default.conf /etc/nginx/conf.d/default.conf

# Add database environment
ADD .env.sample /usr/share/nginx/.env

# Add default config
ADD ./config /usr/share/nginx/config




RUN chown -Rf nginx:nginx /usr/share/nginx/

RUN chmod 666 /etc/hosts 
RUN echo $(netstat -nr | grep '^0\.0\.0\.0' | awk '{print $2}') dockerhost >> /etc/hosts 
RUN chmod 644 /etc/hosts



EXPOSE 80
EXPOSE 9000

The composer config command does nothing
The composer require command breaks outright with this message

  [InvalidArgumentException]
  Could not find a matching version of package wildlife/buildhooks. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).

I think it may have something to do with the plugins being loaded as a volume but the composer config command does nothing either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant