-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
32 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
ARG TARANTOOL_VERSION=2.10.5 | ||
FROM tarantool/tarantool:${TARANTOOL_VERSION}-centos7 AS tarantool-base | ||
FROM tarantool/tarantool:${TARANTOOL_VERSION}-centos7 AS cartridge-base | ||
|
||
# system preparations because docker mount directory as a root | ||
ARG TARANTOOL_SERVER_USER="root" | ||
ARG TARANTOOL_SERVER_GROUP="root" | ||
ARG TARANTOOL_WORKDIR="/app" | ||
ARG TARANTOOL_RUNDIR="/tmp/run" | ||
ARG TARANTOOL_DATADIR="/tmp/data" | ||
ARG TARANTOOL_INSTANCES_FILE="./instances.yml" | ||
ENV TARANTOOL_WORKDIR=$TARANTOOL_WORKDIR | ||
ENV TARANTOOL_RUNDIR=$TARANTOOL_RUNDIR | ||
ENV TARANTOOL_DATADIR=$TARANTOOL_DATADIR | ||
ENV TARANTOOL_INSTANCES_FILE=$TARANTOOL_INSTANCES_FILE | ||
USER $TARANTOOL_SERVER_USER:$TARANTOOL_SERVER_GROUP | ||
RUN groupadd $TARANTOOL_SERVER_GROUP && useradd -m -s /bin/bash $TARANTOOL_SERVER_USER || true | ||
|
||
# install dependencies | ||
RUN yum -y install cmake make gcc gcc-c++ git unzip cartridge-cli && \ | ||
yum clean all | ||
RUN groupadd $TARANTOOL_SERVER_GROUP && useradd -m -s /bin/bash $TARANTOOL_SERVER_USER || true | ||
USER $TARANTOOL_SERVER_USER:$TARANTOOL_SERVER_GROUP | ||
RUN cartridge version | ||
|
||
FROM tarantool-base AS cartridge-base | ||
# build | ||
ARG CARTRIDGE_SRC_DIR="cartridge" | ||
ARG TARANTOOL_WORKDIR="/app" | ||
COPY $CARTRIDGE_SRC_DIR $TARANTOOL_WORKDIR | ||
WORKDIR $TARANTOOL_WORKDIR | ||
CMD cartridge build && cartridge start --run-dir=$TARANTOOL_RUNDIR --data-dir=$TARANTOOL_DATADIR --cfg=$TARANTOOL_INSTANCES_FILE | ||
RUN cartridge build --verbose | ||
|
||
ENV TARANTOOL_RUNDIR="/tmp/run" | ||
ENV TARANTOOL_DATADIR="/tmp/data" | ||
ENV TARANTOOL_INSTANCES_FILE="./instances.yml" | ||
|
||
CMD cartridge start --run-dir=$TARANTOOL_RUNDIR --data-dir=$TARANTOOL_DATADIR --cfg=$TARANTOOL_INSTANCES_FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters