Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions images/broker/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN set -eux; \
apk add --virtual .build-deps curl gnupg unzip; \
curl https://archive.apache.org/dist/rocketmq/${ROCKETMQ_VERSION}/rocketmq-all-${ROCKETMQ_VERSION}-bin-release.zip -o rocketmq.zip; \
curl https://archive.apache.org/dist/rocketmq/${ROCKETMQ_VERSION}/rocketmq-all-${ROCKETMQ_VERSION}-bin-release.zip.asc -o rocketmq.zip.asc; \
curl https://www.apache.org/dist/rocketmq/KEYS -o KEYS; \
curl -L https://www.apache.org/dist/rocketmq/KEYS -o KEYS; \
\
gpg --import KEYS; \
gpg --batch --verify rocketmq.zip.asc rocketmq.zip; \
Expand Down Expand Up @@ -71,4 +71,4 @@ RUN chmod a+x ${ROCKETMQ_HOME}/bin/brokerGenConfig.sh \

WORKDIR ${ROCKETMQ_HOME}/bin

CMD ["/bin/bash", "./brokerStart.sh"]
CMD ["/bin/bash", "./brokerStart.sh"]
2 changes: 1 addition & 1 deletion images/namesrv/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN set -eux; \
apk add --virtual .build-deps curl gnupg unzip; \
curl https://archive.apache.org/dist/rocketmq/${ROCKETMQ_VERSION}/rocketmq-all-${ROCKETMQ_VERSION}-bin-release.zip -o rocketmq.zip; \
curl https://archive.apache.org/dist/rocketmq/${ROCKETMQ_VERSION}/rocketmq-all-${ROCKETMQ_VERSION}-bin-release.zip.asc -o rocketmq.zip.asc; \
curl https://www.apache.org/dist/rocketmq/KEYS -o KEYS; \
curl -L https://www.apache.org/dist/rocketmq/KEYS -o KEYS; \
gpg --import KEYS; \
gpg --batch --verify rocketmq.zip.asc rocketmq.zip; \
unzip rocketmq.zip; \
Expand Down
8 changes: 8 additions & 0 deletions images/namesrv/alpine/runserver-customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@ calculate_heap_sizes()
case "`uname`" in
Linux)
system_memory_in_mb=`free -m| sed -n '2p' | awk '{print $2}'`
system_memory_in_mb_in_docker=$(($(cat /sys/fs/cgroup/memory/memory.limit_in_bytes)/1024/1024))
if [ $system_memory_in_mb_in_docker -lt $system_memory_in_mb ];then
system_memory_in_mb=$system_memory_in_mb_in_docker
fi
system_cpu_cores=`egrep -c 'processor([[:space:]]+):.*' /proc/cpuinfo`
system_cpu_cores_in_docker=$(($(cat /sys/fs/cgroup/cpu/cpu.cfs_quota_us)/$(cat /sys/fs/cgroup/cpu/cpu.cfs_period_us)))
if [ $system_cpu_cores_in_docker -lt $system_cpu_cores -a $system_cpu_cores_in_docker -ne 0 ];then
system_cpu_cores=$system_cpu_cores_in_docker
fi
;;
FreeBSD)
system_memory_in_bytes=`sysctl hw.physmem | awk '{print $2}'`
Expand Down