Skip to content

Commit

Permalink
Add swctl to docker image for health check (apache#5139)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanahmily authored Aug 6, 2020
1 parent 68ab389 commit 24eeb5d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions docker/oap/Dockerfile.oap
Original file line number Diff line number Diff line change
Expand Up @@ -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 " \
Expand All @@ -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; \
Expand Down

0 comments on commit 24eeb5d

Please sign in to comment.