-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile_dev
46 lines (35 loc) · 1.1 KB
/
Dockerfile_dev
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
FROM rootdbapp/rootdb-php-fpm:8.3.7
# Arguments defined in docker-compose.yml
ARG user_id
ARG ROOTDB_RESET
ENV user=rootdb
ENV ROOTDB_RESET=$ROOTDB_RESET
# Install dev dependencies
RUN install_packages git openssh-client vim
# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Create system user to run Composer and Artisan Commands
RUN mkdir -p /home/$user/ \
&& mkdir -p /home/$user/.composer \
&& addgroup "$user" --gid "$user_id"\
&& adduser \
--disabled-password \
--gecos "" \
--home "/home/$user" \
--ingroup "$user" \
--uid "$user_id" \
"$user" \
&& mkdir /home/$user/.ssh \
&& chown -R $user:$user /home/$user
RUN mkdir /var/www/ \
&& mkdir /var/www/archives/ \
&& chown -R $user:$user /etc/supervisor* \
&& chown -R $user:$user /var/www \
&& chown -R $user:$user /home/$user/.ssh \
&& touch /var/log/php8.3-fpm.log \
&& chown $user:$user /var/log/php8.3-fpm.log
WORKDIR /var/www/archives/dev-git/api
USER $user
ENTRYPOINT [ "docker-entrypoint-dev.sh" ]
EXPOSE 9000
CMD ["php-fpm8.3", "-F"]