Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qg-dockerfiles
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qg-dockerfiles
Commits
2a8b750a
Commit
2a8b750a
authored
Dec 18, 2017
by
daidekun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
openresty
parent
41fe07f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
30 deletions
+43
-30
Dockerfile
baseimg/openresty/Dockerfile
+43
-30
No files found.
baseimg/openresty/Dockerfile
View file @
2a8b750a
FROM
192.168.4.36/baseimg/centos
MAINTAINER
kalvin.dai <dekun.dai@quantgroup.cn>
ENV
LUA_VERSION 5.3.4
RUN
echo
$'[nginx]
\n\
name=nginx repo
\n\
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
\n\
gpgcheck=0
\n\
enabled=1
\n\
'
|
tee
/etc/yum.repos.d/nginx.repo
;
\
echo
$'[openresty]
\n\
name=Official OpenResty Repository
\n\
baseurl=https://copr-be.cloud.fedoraproject.org/results/openresty/openresty/epel-$releasever-$basearch/
\n\
skip_if_unavailable=True
\n\
gpgcheck=1
\n\
gpgkey=https://copr-be.cloud.fedoraproject.org/results/openresty/openresty/pubkey.gpg
\n\
enabled=1
\n\
enabled_metadata=1
\n\
'
|
tee
/etc/yum.repos.d/openresty.repo
;
\
rpm
-Uvh
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
\
ARG
RESTY_LUAROCKS_VERSION="2.4.3"
ARG
RESTY_RPM_FLAVOR=""
ARG
RESTY_RPM_VERSION="1.13.6.1-1.el7.centos"
ARG
RESTY_RPM_ARCH="x86_64"
# Install OpenResty
&& yum -y update && yum -y install make gcc readline-devel ;\
curl -L http://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz | tar xzf - && \
cd /lua-${LUA_VERSION} && \
make linux test && \
make install && \
cd .. && rm -rf /lua-${LUA_VERSION} &&\
yum install -y \
nginx luajit luajit-fun inotify-tools openresty \
openresty-{openssl,opm,pcre,resty,zlib,valgrind} \
lua-{fun,json,lpeg,ldap,lunit,md5} source-highlight \
&& yum clean all
RUN
yum-config-manager
--add-repo
https://openresty.org/package/centos/openresty.repo
\
&&
yum
install
-y
\
gettext
\
make
\
openresty
${
RESTY_RPM_FLAVOR
}
-
${
RESTY_RPM_VERSION
}
.
${
RESTY_RPM_ARCH
}
\
openresty-opm-
${
RESTY_RPM_VERSION
}
\
openresty-resty-
${
RESTY_RPM_VERSION
}
\
unzip
\
&&
cd
/tmp
\
&&
curl
-fSL
https://github.com/luarocks/luarocks/archive/
${
RESTY_LUAROCKS_VERSION
}
.tar.gz
-o
luarocks-
${
RESTY_LUAROCKS_VERSION
}
.tar.gz
\
&&
tar
xzf luarocks-
${
RESTY_LUAROCKS_VERSION
}
.tar.gz
\
&&
cd
luarocks-
${
RESTY_LUAROCKS_VERSION
}
\
&&
./configure
\
--prefix
=
/usr/local/openresty/luajit
\
--with-lua
=
/usr/local/openresty/luajit
\
--lua-suffix
=
jit-2.1.0-beta3
\
--with-lua-include
=
/usr/local/openresty/luajit/include/luajit-2.1
\
&&
make build
\
&&
make
install
\
&&
cd
/tmp
\
&&
rm
-rf
luarocks-
${
RESTY_LUAROCKS_VERSION
}
luarocks-
${
RESTY_LUAROCKS_VERSION
}
.tar.gz
\
&&
yum remove
-y
make
\
&&
yum clean all
\
&&
ln
-sf
/dev/stdout /usr/local/openresty/nginx/logs/access.log
\
&&
ln
-sf
/dev/stderr /usr/local/openresty/nginx/logs/error.log
# Unused, present for parity with other Dockerfiles
# This makes some tooling/testing easier, as specifying a build-arg
# and not consuming it fails the build.
ARG
RESTY_J="1"
# Add additional binaries into PATH for convenience
ENV
PATH=$PATH:/usr/local/openresty/luajit/bin/:/usr/local/openresty/nginx/sbin/:/usr/local/openresty/bin/
# Copy nginx configuration files
COPY
nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
COPY
nginx.vh.default.conf /etc/nginx/conf.d/default.conf
EXPOSE
80 443 3000 9001
CMD
["openresty","-g","daemon off;"]
\ No newline at end of file
CMD
["/usr/bin/openresty", "-g", "daemon off;"]
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment