Dockerfile 815 B

123456789101112131415161718192021222324252627282930313233
  1. FROM php:7.2-alpine
  2. # postgresql-dev: required for build of pdo_pgsql (includes libpq-fe.h)
  3. # zlib-dev: required by zip module
  4. # yarn: called by artisan koel:init to prepare frontend
  5. RUN apk add \
  6. composer \
  7. git \
  8. postgresql-dev \
  9. yarn \
  10. zlib-dev
  11. RUN docker-php-ext-install -j$(nproc) \
  12. exif \
  13. pdo_pgsql \
  14. zip
  15. RUN git clone --branch master --recurse-submodules \
  16. https://github.com/phanan/koel /koel
  17. WORKDIR /koel
  18. # In Encrypter.php line 43:
  19. # The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.
  20. RUN sed 's/^APP_KEY=$/APP_KEY=WORKAROUND_000000000000000000000/' .env.example >.env
  21. RUN composer install --no-interaction
  22. # TODO revert workaround
  23. RUN yarn install
  24. # TODO run as non-root
  25. COPY /run-koel.sh /
  26. EXPOSE 8080
  27. CMD ["/run-koel.sh"]