This repository was archived by the owner on May 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (38 loc) · 1.34 KB
/
Dockerfile
File metadata and controls
44 lines (38 loc) · 1.34 KB
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
FROM debian:8
# Install Nginx.
RUN \
apt-get update && \
apt-get install -y nginx && \
apt-get install -y curl && \
apt-get install -y git-core && \
curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
apt-get install -y nodejs && \
apt-get install -y gcc build-essential && \
apt-get install -y ruby ruby-dev && \
gem install --no-rdoc --no-ri sass && \
gem install compass && \
npm install bower -g && \
npm install grunt -g && \
rm -rf /var/lib/apt/lists/* && \
echo "\ndaemon off;" >> /etc/nginx/nginx.conf && \
chown -R www-data:www-data /var/lib/nginx && \
mkdir -p /var/cache/nginx && \
chmod -R 777 /var/cache/nginx
# Define mountable directories.
VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d", "/var/log/nginx"]
### COPY DIST STUFF TO var/www/html
ADD . /sourcebuild
RUN cd /sourcebuild && chmod +x ./build-dist.sh && ./build-dist.sh && rm -Rf /var/www/html && mv /sourcebuild/dist /var/www/html
ADD tools /tools
RUN chmod +x /tools/*.sh && \
chmod -R 777 /var/www/html && \
chmod -R 777 /var/log/nginx && \
chown -R www-data:www-data /var/www/
# Define working directory.
WORKDIR /etc/nginx
ENV GLPI_API_URL http://flyve-glpi:8090/api
ENV GLPI_API_TOKEN j8lth8dqvgky79f0dyf4jc59p353u34eao9rwlis3
# Define default command.
CMD ["/tools/run-nginx.sh"]
# Expose ports.
EXPOSE 80