#duh! Pick the base image (this is latest as of May 2020)
FROM php:7.4.5-apache
# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
#duh!
RUN apt-get update
#Install zip+icu dev libs
RUN apt-get install libzip-dev zip libicu-dev -y
#Install PHP extensions zip and intl (intl requires to be configured)
RUN docker-php-ext-install zip && docker-php-ext-configure intl && docker-php-ext-install intl
#Required for htaccess rewrite rules
RUN a2enmod rewrite
Last active
June 21, 2020 04:23
-
-
Save jdecode/69f51cc0680de7c885770cbef65ba254 to your computer and use it in GitHub Desktop.
Docker commands that I run almost every time I am qaing something new
Instructions to use above Dockerfile and docker-compose.yml files.
Place these in a folder, and go to Ubuntu 19.10 CLI (not tested anywhere else, yet) and enter:
docker-compose up --build
For CakePHP, go to 172.43.1.1
For Laravel, go to 172.53.1.1
Switched to Ubuntu 20.04 and docker login
was failing.
Google/GitHub gave the solution - sudo apt install golang-docker-credential-helpers
docker-compose run kode bin/cake migrations migrate
docker-compose run kode bin/cake migrations seed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Laravel
Dockerfile
content(Yes, I got lazy with naming, or rather this is neat)
docker-compose.yml
content