-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
executable file
·59 lines (44 loc) · 1.3 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM php:7.4-fpm
# Arguments defined in docker-compose.yml
ARG user
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
vim \
libpng-dev \
libonig-dev \
libxml2-dev \
zip \
unzip \
libzip-dev \
libcurl4-openssl-dev \
pkg-config \
libssl-dev \
libpq-dev \
&& docker-php-ext-configure gd \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-install pdo pdo_pgsql pgsql \
&& docker-php-ext-install zip \
&& docker-php-source delete
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Install PHP extensions
# RUN docker-php-ext-install pdo_pgsql zip mbstring exif pcntl bcmath gd xml
# Install node
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install -y nodejs
# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Create system user to run Composer and Artisan Commands
# Add user for laravel application
RUN groupadd -g 1000 www
RUN useradd -u 1000 -ms /bin/bash -g www www
# Set working directory
WORKDIR /var/www/web-wallets
COPY . /var/www/web-wallets
RUN composer install --ignore-platform-reqs
RUN npm i
USER $user
# COPY ./entrypoint.sh /entrypoint.sh