-
Notifications
You must be signed in to change notification settings - Fork 10
/
.gitpod.Dockerfile
executable file
·66 lines (53 loc) · 2.07 KB
/
.gitpod.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
58
59
60
61
62
63
64
65
66
FROM gitpod/workspace-full
USER root
RUN apt-get update && apt-get install -y apt-transport-https\
&& apt-get install -yq php-fpm php-cli php-bz2 php-bcmath php-gmp php-imap php-soap php-xmlrpc php-ldap \
&& apt-get install -y php-amqp php-apcu php-imagick php-memcached php-mongodb php-oauth php-redis\
&& apt-get install -y mysql-server \
&& apt-get clean -y \
&& rm -rf /var/cache/apt/* /var/lib/apt/lists/* /tmp/* \
&& chown -R gitpod:gitpod /etc/mysql /var/run/mysqld /var/log/mysql /var/lib/mysql /var/lib/mysql-files /var/lib/mysql-keyring /var/lib/mysql-upgrade
RUN a2enmod rewrite
RUN echo 'worker_processes auto;\n\
pid /var/run/nginx/nginx.pid;\n\
include /etc/nginx/modules-enabled/*.conf;\n\
env NGINX_DOCROOT_IN_REPO;\n\
env GITPOD_REPO_ROOT;\n\
events {\n\
worker_connections 768;\n\
multi_accept on;\n\
}\n\
http {\n\
sendfile on;\n\
tcp_nopush on;\n\
tcp_nodelay on;\n\
keepalive_timeout 65;\n\
types_hash_max_size 2048;\n\
include /etc/nginx/mime.types;\n\
access_log /var/log/nginx/access.log;\n\
error_log /var/log/nginx/error.log;\n\
gzip on;\n\
include /etc/nginx/conf.d/*.conf;\n\
server {\n\
set_by_lua $nginx_docroot_in_repo '"'"'return os.getenv("NGINX_DOCROOT_IN_REPO")'"'"';\n\
set_by_lua $gitpod_repo_root '"'"'return os.getenv("GITPOD_REPO_ROOT")'"'"';\n\
listen 0.0.0.0:8002;\n\
location / {\n\
root $gitpod_repo_root/$nginx_docroot_in_repo;\n\
index index.html index.htm index.php;\n\
}\n\
}\n\
}' > /etc/nginx/nginx.conf
COPY apache.conf /etc/apache2/apache2.conf
COPY mysql.cnf /etc/mysql/mysql.conf.d/mysqld.cnf
COPY client.cnf /etc/mysql/mysql.conf.d/client.cnf
COPY mysql-bashrc-launch.sh /etc/mysql/mysql-bashrc-launch.sh
USER gitpod
RUN echo ". /etc/mysql/mysql-bashrc-launch.sh" >> ~/.bashrc
RUN sudo apt-get install php-soap
# Local environment variables
# C9USER is temporary to allow the MySQL Gist to run
ENV C9_USER="root"
ENV PORT="8080"
ENV IP="0.0.0.0"
ENV C9_HOSTNAME="localhost"