From 2df4001cb7d5ea8c71185541eaeb689aa42b991e Mon Sep 17 00:00:00 2001 From: wangxye Date: Tue, 24 Oct 2023 15:59:29 +0800 Subject: [PATCH] feat: update the dockerfile to build Signed-off-by: wangxye --- rocketmq-docker/Dockerfile | 13 +------------ rocketmq-docker/build-image.sh | 3 ++- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/rocketmq-docker/Dockerfile b/rocketmq-docker/Dockerfile index 6979557..3777698 100644 --- a/rocketmq-docker/Dockerfile +++ b/rocketmq-docker/Dockerfile @@ -31,7 +31,6 @@ ARG version # Rocketmq version ENV ROCKETMQ_VERSION ${version} - ARG ROCKETMQ_DIR ENV ROCKETMQ_NAME rocketmq-on-s3 @@ -39,27 +38,17 @@ ENV ROCKETMQ_HOME /home/rocketmq/${ROCKETMQ_NAME}-${ROCKETMQ_VERSION} WORKDIR ${ROCKETMQ_HOME} - # Install COPY rocketmq/ ${ROCKETMQ_HOME}/dist RUN mv ${ROCKETMQ_HOME}/dist/* ${ROCKETMQ_HOME}/ && \ rm -rf ${ROCKETMQ_HOME}/dist - - -# RUN chown -R ${uid}:${gid} ${ROCKETMQ_HOME} EXPOSE 8081 RUN chmod a+x ${ROCKETMQ_HOME}/bin/run-server.sh - # Export Java options RUN export JAVA_OPT=" -Duser.home=/opt" - -WORKDIR ${ROCKETMQ_HOME}/bin - -# CMD ["sh", "-c", "sh ./bin/run-server.sh com.automq.rocketmq.broker.BrokerStartup -c ./conf/broker.yaml"] - - +WORKDIR ${ROCKETMQ_HOME}/bin \ No newline at end of file diff --git a/rocketmq-docker/build-image.sh b/rocketmq-docker/build-image.sh index cd7465c..5eead19 100644 --- a/rocketmq-docker/build-image.sh +++ b/rocketmq-docker/build-image.sh @@ -17,8 +17,9 @@ ROCKETMQ_VERSION=$1 +ROCKETMQ_REPO=$2 cp -r ../../rocketmq ./ -docker build --no-cache -f Dockerfile -t automqinc/rocketmq:${ROCKETMQ_VERSION}-alpine --build-arg version=${ROCKETMQ_VERSION} . --progress=plain \ No newline at end of file +docker build --no-cache -f Dockerfile -t ${ROCKETMQ_REPO}:${ROCKETMQ_VERSION} --build-arg version=${ROCKETMQ_VERSION} . --progress=plain \ No newline at end of file