diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..68346d87193acdf05a827bec55992bee51f36be8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM rabbitmq:3.13.3-alpine +LABEL author="Sofiane Lasri" + +RUN adduser --disabled-password --home /home/container container + +USER container +ENV USER=container HOME=/home/container + +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh + +CMD ["/bin/bash", "/entrypoint.sh"] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000000000000000000000000000000000000..c9f8d4682b231fb7c0ad101599d8d8786aa6410c --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/bash +cd /home/container + +MODIFIED_STARTUP=$(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} \ No newline at end of file