Skip to content

Instantly share code, notes, and snippets.

@josemmo
Created March 3, 2019 15:37
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 josemmo/a1986e2d73bccf1db4e21d7ebced88c2 to your computer and use it in GitHub Desktop.
Save josemmo/a1986e2d73bccf1db4e21d7ebced88c2 to your computer and use it in GitHub Desktop.
FROM php:7.3-fpm-stretch
# Instalar dependencias
RUN apt update -y && apt upgrade -yqq
RUN apt install -y curl gnupg
# Instalar NodeJS
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt install -y nodejs
# Instalar Composer
RUN curl -sS https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer
# Compilar extensión php-zip
RUN apt install -y zip libzip-dev
RUN docker-php-ext-configure zip --with-libzip
RUN docker-php-ext-install zip
# Compilar la app
WORKDIR /aplicacion
COPY . .
ENV APP_ENV=prod
RUN npm update -g npm && npm install && npm run build
RUN composer install --no-dev --optimize-autoloader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment