docker-images-php
docker-images-php copied to clipboard
Enable Ghostscript
Your issue may already be reported! Please search on the issue tracker before creating one.
I took out all the text, just because its not really an issue. Its a request for help.
Is there any way i can enable GhostScript using this docker image? Do i need to create a dockerfile myself?, I never done that before.
But i want to create thumbnails of PDF, and what i found is that i need Ghostscript for this.
Hopefully asking help like this is allowed.
I've been able to install it using a DockerFile.
Dockerfile-apache file:
FROM thecodingmachine/php:7.3-v2-apache
RUN sudo rm -rf /var/lib/apt/lists/* && sudo apt-get update
RUN sudo apt-get --yes install ghostscript
docker-compose.yml file:
version: '3'
services:
apache:
build:
context: .
dockerfile: Dockerfile-apache
container_name: apache
environment:
PHP_INI_POST_MAX_SIZE: 300M
PHP_INI_UPLOAD_MAX_FILESIZE: 300M
PHP_INI_LOG_ERRORS: 1
volumes:
- ../../.:/var/www/html
ports:
- 80:80
- 443:443
This answer should work but i recommand this one instead :
# use supported V4 version of image and current php version
FROM thecodingmachine/php:8.0-v4-apache
# Delete cache file of apt at the end of same instruction file (to prevent larger docker image)
RUN sudo apt-get update && \
sudo apt-get -y install ghostscript && \
sudo rm -rf /var/lib/apt/lists/*