bender/Dockerfile.sh

25 lines
938 B
Bash
Raw Normal View History

#!/bin/bash
cat <<EOF
FROM $BASE_IMAGE
MAINTAINER Sergei Shuvatov <s.shuvatov@rbkmoney.com>
2019-04-20 00:45:33 +00:00
RUN mkdir -p /var/log/bender
COPY ./_build/prod/rel/bender /opt/bender
2019-04-20 00:45:33 +00:00
WORKDIR /opt/bender
CMD /opt/bender/bin/bender foreground
EXPOSE 8022
2019-04-20 00:45:33 +00:00
LABEL com.rbkmoney.$SERVICE_NAME.parent=$BASE_IMAGE_NAME \
com.rbkmoney.$SERVICE_NAME.parent_tag=$BASE_IMAGE_TAG \
com.rbkmoney.$SERVICE_NAME.build_img=build \
com.rbkmoney.$SERVICE_NAME.build_img_tag=$BUILD_IMAGE_TAG \
com.rbkmoney.$SERVICE_NAME.commit_id=$(git rev-parse HEAD) \
com.rbkmoney.$SERVICE_NAME.commit_number=$(git rev-list --count HEAD) \
com.rbkmoney.$SERVICE_NAME.branch=$( \
if [ "HEAD" != $(git rev-parse --abbrev-ref HEAD) ]; then \
echo $(git rev-parse --abbrev-ref HEAD); \
elif [ -n "$BRANCH_NAME" ]; then \
echo $BRANCH_NAME; \
else \
echo $(git name-rev --name-only HEAD); \
fi)
EOF