Skip to content

Commit

Permalink
feat: update the dockerfile to build
Browse files Browse the repository at this point in the history
Signed-off-by: wangxye <[email protected]>
  • Loading branch information
wangxye committed Oct 24, 2023
1 parent 3c0544c commit 2df4001
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
13 changes: 1 addition & 12 deletions rocketmq-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,35 +31,24 @@ ARG version
# Rocketmq version
ENV ROCKETMQ_VERSION ${version}


ARG ROCKETMQ_DIR

ENV ROCKETMQ_NAME rocketmq-on-s3
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
3 changes: 2 additions & 1 deletion rocketmq-docker/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
docker build --no-cache -f Dockerfile -t ${ROCKETMQ_REPO}:${ROCKETMQ_VERSION} --build-arg version=${ROCKETMQ_VERSION} . --progress=plain

0 comments on commit 2df4001

Please sign in to comment.