-
Notifications
You must be signed in to change notification settings - Fork 24
/
Dockerfile
62 lines (40 loc) · 1.34 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
61
FROM debian:jessie
MAINTAINER Denny de la Haye <[email protected]>
# Set some general config stuff
ENV APP_NAME=ShinyCMS \
APP_PORT=6174 \
APP_USER=shinycms \
APP_DIR=/opt/shinycms \
SHINYCMS_CONFIG=/opt/shinycms/config/shinycms.conf
# Install required Debian packages
RUN apt update \
\
&& apt install -y \
cpanminus \
gcc \
libexpat-dev `# Required by XML::Parser for XML::Feed` \
libmysqlclient-dev `# Required by DBD::mysql` \
libpq-dev `# Required by DBD::Pg` \
libxml2-dev `# Required by XML::LibXML for XML::Feed` \
make \
zlib1g-dev `# Required by XML::LibXML for XML::Feed` \
\
&& apt clean \
\
&& rm -rf /var/cache/apt/archives/*
# Install required CPAN modules
RUN cpanm --quiet --notest --no-man-pages Module::Install::Catalyst Module::Build DBD::mysql \
\
&& cpanm --quiet --notest --no-man-pages --installdeps . \
\
&& rm -rf /root/.cpan /root/.cpanm
# Copy the webapp files into place and make sure our webapp user owns them
RUN mkdir $APP_DIR
COPY . $APP_DIR
RUN groupadd -r $APP_USER && useradd -r -g $APP_USER $APP_USER
RUN chown -R $APP_USER.$APP_USER $APP_DIR
# Run the webapp!
EXPOSE $APP_PORT
WORKDIR $APP_DIR
USER $APP_USER
CMD script/shinycms_server.pl --port 6174