GrupoTP-37/docker/Dockerfile

40 lines
858 B
Docker
Raw Permalink Normal View History

2023-10-29 16:34:24 +00:00
# Dockerfile for the laravel.io application
FROM ubuntu:22.04
RUN apt update
# install system dependencies
RUN apt install software-properties-common git -y
RUN git clone https://github.com/laravelio/laravel.io.git /app/laravel
WORKDIR /app/laravel
2023-10-31 13:47:04 +00:00
RUN mv .env.example .env
# add php apt repo
RUN add-apt-repository ppa:ondrej/php
RUN apt update
# install app dependencies
2023-11-07 19:34:50 +00:00
RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Lisbon apt install php8.2 \
php8.2-simplexml php8.2-curl php8.2-dom php8.2-mysql composer npm \
mysql-client -y
ENV DB_CONNECTION=mysql
ENV DB_HOST=laraveldb
ENV DB_DATABASE=laravel
ENV DB_USERNAME=myuser
ENV DB_PASSWORD=password
RUN composer install
RUN php artisan key:generate
RUN npm install
RUN npm run build
#Open on port 8000 to all addresses
2023-12-07 20:54:31 +00:00
ENTRYPOINT php artisan serve --port=8000 --host=0.0.0.0
2023-11-07 19:34:50 +00:00
EXPOSE 8000