Skip to content

Instantly share code, notes, and snippets.

@andrei-coelho
Last active March 23, 2022 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrei-coelho/95ca33ebbcd54359c1fe3d3b2e5d71b1 to your computer and use it in GitHub Desktop.
Save andrei-coelho/95ca33ebbcd54359c1fe3d3b2e5d71b1 to your computer and use it in GitHub Desktop.
Dockerfile PHP+mysql+composer
FROM php:8.0-apache
RUN apt update
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install mariadb-server && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install mariadb-client
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
WORKDIR /var/www/html
COPY . .
# para iniciar o mysql do container:
# docker exec -it myapp sh -c "service mariadb start"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment