-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
44 lines (31 loc) · 1.2 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
# Dockerfile for production
FROM php:7.4-apache
COPY vhost.conf /etc/apache2/sites-available/000-default.conf
COPY . /srv/app
WORKDIR /srv/app
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
RUN mkdir -p /srv/app/storage/code
RUN chmod -R ug+rwx /srv/app/storage/code && chown -R www-data:www-data /srv/app && a2enmod rewrite
RUN chmod +x /srv/app/prettierd.js
# Packages for formatting C and C++ code
RUN apt-get update -y && \
apt-get install -y clang-format
# Packages for formatting Go code
RUN apt-get update -y && \
apt-get install -y golang
# Packages for formatting Python code
RUN apt-get update -y && \
apt-get install -y python3.7-minimal python3-pip && \
pip3 install black
# Packages for formatting code using Prettier (JS, CSS, PHP, etc)
RUN apt-get update -y && \
curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
apt-get install -y git nodejs && npm install
# Install prettier-daemon
COPY prettierd-server.sh /usr/local/bin/prettierd-server
RUN chmod +x /usr/local/bin/prettierd-server
# Install custom entrypoint
COPY entrypoint.sh /usr/local/bin/cf-entrypoint
RUN chmod +x /usr/local/bin/cf-entrypoint
ENTRYPOINT ["cf-entrypoint"]
EXPOSE 8080