kds/Dockerfile.sh
ndiezel0 6c4d623cca
CDS-65: Move CDS Keyring to it's own service (#1)
* CDS-65: Move CDS Keyring to it's own service

* CDS-65: Add libdecaf to app.src and recon

* CDS-65: remove unneeded deps

* CDS-65: fix services order, remove .sp and fix README

* CDS-65: change log printing style for stacktrace and remove raising woody error with term()

* CDS-65: doc fix

* CDS-65: fix rebar.config

* CDS-65: review fixes

* CDS-65: fix tests

* CDS-65: fix format and woody raise error types

* CDS-65: move kds_keyring_client to test/ folder and introduce cipher macro

* CDS-65: move private keys to files in tests

* CDS-65: remove reverse list from tests and make convert_to_map/1 to convert_to_map/2

* CDS-65: Review fixes

* CDS-65: Compile fix

* CDS-65: Remove keyring storage env

* CDS-65: Make kds_keyring_storage_file stateful

* CDS-65: Add comments on why we can't catch exact shamir errors

* CDS-65: Rename service_code to service_name

Co-Authored-By: Andrew Mayorov <encube.ul@gmail.com>

* CDS-65: Review fixes

* CDS-65: Add stacktrace to keysharing error logging

* CDS-65: Lint fix

* CDS-65: app start fix

* CDS-65: fix dialyzer

* CDS-65: Introduce generic keyring_storage_opts in config
2019-06-21 11:46:13 +03:00

28 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
cat <<EOF
FROM $BASE_IMAGE
MAINTAINER Rustem Shaydullin <ndiezel0@gmail.com>
COPY _build/prod/rel/kds /opt/kds
CMD /opt/kds/bin/kds foreground
EXPOSE 8022
# A bit of magic below to get a proper branch name
# even when the HEAD is detached (Hey Jenkins!
# BRANCH_NAME is available in Jenkins env).
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)
WORKDIR /opt/kds
EOF