memory

Play Memory
Log | Files | Refs

Dockerfile (658B)


      1 FROM php:alpine
      2 
      3 # Install composer
      4 RUN apk add --no-cache curl
      5 RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
      6 
      7 # Create volume for the database
      8 VOLUME [ "/usr/src/memory-backend/var" ]
      9 
     10 # Copy the application
     11 COPY . /usr/src/memory-backend
     12 WORKDIR /usr/src/memory-backend
     13 
     14 # Install dependencies
     15 RUN composer install
     16 
     17 # Create the database (shouldn't really be used in production environments)
     18 WORKDIR /usr/src/memory-backend
     19 RUN ["php", "bin/console", "doctrine:schema:update", "--force"]
     20 
     21 # Run the application
     22 WORKDIR /usr/src/memory-backend/public
     23 CMD ["php", "-S", "0.0.0.0:8000"]
     24 
     25 EXPOSE 8000