-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathdockerfile
60 lines (49 loc) · 1.32 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
58
59
60
FROM ubuntu:19.04
ENV domain=localhost
# Install Node.js 14
RUN apt-get update
RUN apt-get -qq update
RUN apt-get install -y build-essential
RUN apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash
RUN apt-get install -y nodejs
# Install SuperAdmin dependencies
RUN apt-get install -y nginx \
graphicsmagick \
zip \
ftp \
unzip \
lsof \
socat \
git
RUN curl https://get.acme.sh | sh
RUN npm install -g total4
RUN npm install -g total.js
RUN rm -rf /var/cache/apk/*
# Configure and copy SuperAdmin directory
WORKDIR /www
RUN mkdir /www/logs/
RUN mkdir /www/nginx/
RUN mkdir /www/acme/
RUN mkdir /www/ssl/
RUN mkdir /www/www/
RUN mkdir /www/superadmin/
RUN mkdir /www/node_modules/
RUN npm install total4
RUN npm install total.js
RUN npm install dbms
ADD . /www/superadmin
RUN echo "root:0:0" >> /www/superadmin/user.guid
# Configure nginx
COPY nginx.conf /etc/nginx/nginx.conf
COPY superadmin.conf /www/nginx/
RUN sed -i s/#disablehttp#//g /www/nginx/superadmin.conf
RUN sed -i s/#domain#/$domain/g /www/nginx/superadmin.conf
EXPOSE 80 443 9999
CMD /www/superadmin/run-docker.sh
#BUILDING IT
#docker build -t superadmin:1.5 .
#RUN IT (you can also map any of the exposed ports above)
#docker run -p 8080:80 -it superadmin:1.5
#EXEC IT (access bash whilst it is running)
#docker exec -it a1ec4787d56b bash