未验证 提交 24eeb5d8 编写于 作者: G Gao Hongtao 提交者: GitHub

Add swctl to docker image for health check (#5139)

上级 68ab3890
......@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
version: '3.3'
version: '3.5'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${ES_TAG}
......@@ -42,6 +42,14 @@ services:
environment:
SW_STORAGE: elasticsearch
SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200
SW_HEALTH_CHECKER: default
SW_TELEMETRY: prometheus
healthcheck:
test: ["CMD", "./bin/swctl", "ch"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
ui:
image: skywalking/ui:${TAG}
container_name: ui
......
......@@ -16,6 +16,8 @@
ARG JAVA_VERSION=8
FROM apache/skywalking-base:8.1.0-es6 AS cli
FROM adoptopenjdk/openjdk$JAVA_VERSION:alpine
ENV JAVA_OPTS=" -Xms256M " \
......@@ -31,10 +33,13 @@ RUN set -ex; \
rm -rf "$DIST_NAME.tar.gz"; \
rm -rf "$DIST_NAME/config/log4j2.xml"; \
rm -rf "$DIST_NAME/bin"; rm -rf "$DIST_NAME/webapp"; rm -rf "$DIST_NAME/agent"; \
mkdir "$DIST_NAME/bin"; \
mv "$DIST_NAME" skywalking;
WORKDIR skywalking
COPY --from=cli /skywalking/bin/swctl ./bin
COPY log4j2.xml config/
COPY docker-entrypoint.sh .
RUN mkdir ext-config; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册