Newer
Older
LUAROCK_VSHARD_VERSION=0.1.18 \
LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \
LUAROCK_EXPERATIOND_VERSION=1.1.1 \
LUAROCK_QUEUE_VERSION=1.1.0 \
LUAROCK_CONNPOOL_VERSION=1.1.1 \
LUAROCK_HTTP_VERSION=1.2.0 \
LUAROCK_MEMCACHED_VERSION=1.0.1 \
LUAROCK_METRICS_VERSION=0.12.0 \
LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \
LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.0 \
LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \
LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \
LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1
COPY docker/files/luarocks-config_centos.lua /usr/local/etc/luarocks/config-5.1.lua
COPY docker/files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua
RUN ["groupadd", "tarantool"]
RUN ["adduser", "-g", "tarantool", "tarantool"]
ARG TARANTOOL_VERSION
RUN if test -z "${TARANTOOL_VERSION}"; then \
echo ""; \
echo "Missing docker build arg TARANTOOL_VERSION:"; \
echo "Run: "; \
echo ""; \
echo " docker build --build-arg TARANTOOL_VERSION=..."; \
echo ""; \
exit 1; \
else \
echo ""; \
echo " TARANTOOL_VERSION=${TARANTOOL_VERSION}"; \
echo ""; \
fi;
# Set yum repository for Postgresql 14 since this version
# has been removed from pgdg repository.
RUN dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-`rpm -E %{rhel}`-x86_64/pgdg-redhat-repo-latest.noarch.rpm \
&& dnf -qy module disable postgresql \
&& dnf --enablerepo=powertools install perl-IPC-Run -y \
&& curl -L https://download.picodata.io/tarantool-picodata/install.sh | bash \
tarantool-picodata-${TARANTOOL_VERSION} \
tarantool-picodata-devel-${TARANTOOL_VERSION} \
postgresql14-libs \
cyrus-sasl \
libev \
proj \
geos \
unzip \
openssl-libs \
luarocks \
git \
cmake \
make \
gcc-c++ \
postgresql14-devel \
cyrus-sasl-devel \
libev-devel \
wget \
proj-devel \
geos-devel \
openssl-devel \
gperftools-libs \
&& ln -s /usr/lib64/libprofiler.so.0 /usr/lib64/libprofiler.so \
&& ln -s $(cat /etc/ld.so.conf.d/postgresql-pgdg-libs.conf | cut -f 1-3 -d '/') /usr/include/postgresql \
&& sed -i "s|http://rocks.tarantool.org/|https://download.binary.picodata.io/luarocks-tnt/|g" /usr/share/tarantool/luarocks/core/hardcoded.lua \
&& mkdir -p /.rocks \
&& tarantoolctl rocks install lua-term \
&& tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \
&& tarantoolctl rocks install checks $LUAROCK_CHECKS_VERSION \
&& tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \
&& tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \
&& tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \
&& tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \
&& tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \
&& tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \
&& tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \
&& tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \
&& tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \
&& tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \
&& sed -i "s/#error 'To use the proj_api.h/#define ACCEPT_USR_OF_DEPRECATED_PROJ_API_H 1/g" /usr/include/proj_api.h \
&& tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \
&& tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \
&& : "---------- remove build deps ----------" \
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
git \
cmake \
postgresql14-devel \
cyrus-sasl-devel \
libev-devel \
wget \
proj-devel \
geos-devel \
openssl-devel \
kernel-headers \
cpp \
perl \
&& rm -rf /var/cache/yum \
&& : "---------- gosu ----------" \
&& gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys \
B42F6819007F00F88E364FD4036A9C25BF357DD4 \
&& curl -o /usr/local/bin/gosu -SL \
"https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64" \
&& curl -o /usr/local/bin/gosu.asc -SL \
"https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64.asc" \
&& gpg --verify /usr/local/bin/gosu.asc \
&& rm /usr/local/bin/gosu.asc \
&& rm -r /root/.gnupg/ \
&& chmod +x /usr/local/bin/gosu \
&& mkdir -p /var/lib/tarantool \
&& mkdir -p /opt/tarantool \
&& mkdir -p /var/run/tarantool \
&& chown tarantool:tarantool /var/lib/tarantool \
&& chown tarantool:tarantool /opt/tarantool \
&& chown tarantool:tarantool /var/run/tarantool \
&& chown tarantool:tarantool /etc/tarantool \
&& ln -s /usr/local/bin/docker-entrypoint.sh /entrypoint.sh
VOLUME /var/lib/tarantool
WORKDIR /opt/tarantool
COPY docker/files/tarantool-entrypoint.lua /usr/local/bin/
COPY docker/files/tarantool_set_config.lua /usr/local/bin/
COPY docker/files/docker-entrypoint_centos.sh /usr/local/bin/docker-entrypoint.sh
COPY docker/files/console /usr/local/bin/
COPY docker/files/tarantool_is_up /usr/local/bin/
COPY docker/files/tarantool.default /usr/local/etc/default/tarantool
HEALTHCHECK CMD tarantool_is_up
EXPOSE 3301
CMD [ "tarantool" ]