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

Glitch seems broken? #94

Closed
fruitl00p opened this issue Jun 23, 2016 · 2 comments
Closed

Glitch seems broken? #94

fruitl00p opened this issue Jun 23, 2016 · 2 comments

Comments

@fruitl00p
Copy link
Contributor

For the life of me I cant get glitch to work?

#
# Not working... seems like the glitch library (?) or something is missing?
# "[League\Flysystem\FileNotFoundException]
#  File not found at path: var/app/raffler.g"
#
FROM php:7-alpine
MAINTAINER [email protected]

# Create working dir
RUN mkdir -p /var/app
COPY . /var/app
WORKDIR /var/app

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
    composer install --prefer-dist --no-dev -o

CMD ["php", "/var/app/vendor/bin/glitch", "/var/app/raffler.g", "/var/names"]

This would work... ?

@scato
Copy link
Contributor

scato commented Jun 30, 2016

Yes, the problem is... You have to give FlySystem a root directory, so I had to choose between / and the current working directory. I chose the latter (/var/app in this case). And then you can never go outside that root directory, so ../names wouldn't work.

I got it to work like this:

# Create working dir
RUN mkdir -p /var/app
COPY . /var/app
WORKDIR /var/app

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
    composer install --prefer-dist --no-dev -o

CMD ["php", "/var/app/vendor/bin/glitch", "raffler.g", "example_names"]

@fruitl00p
Copy link
Contributor Author

@scato cool... The problem is: the /var/names is the location the names file will be injected into the container.. (if i understood @lucasvanlierop correctly) Which in this case would be:

docker run -v $(the-names-location-on-the-host):/var/names scato-glitch

I f*gly fixed it by pre-symlinking the names location into the /var/app folder :)

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

2 participants