<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alif Ruliarso</title>
    <description>The latest articles on DEV Community by Alif Ruliarso (@alifrul).</description>
    <link>https://dev.to/alifrul</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F86325%2Fbae219a7-80b8-4244-acb6-0036496c4576.jpg</url>
      <title>DEV Community: Alif Ruliarso</title>
      <link>https://dev.to/alifrul</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alifrul"/>
    <language>en</language>
    <item>
      <title>Crafting Lean Java Runtimes with jlink: SpringBoot Docker</title>
      <dc:creator>Alif Ruliarso</dc:creator>
      <pubDate>Sun, 26 Nov 2023 16:14:14 +0000</pubDate>
      <link>https://dev.to/alifrul/crafting-lean-java-runtimes-with-jlink-springboot-docker-329d</link>
      <guid>https://dev.to/alifrul/crafting-lean-java-runtimes-with-jlink-springboot-docker-329d</guid>
      <description>&lt;p&gt;In my last adventure into the realm of Spring Boot and Docker, we explored the art of &lt;a href="https://dev.to/alifrul/spring-boot-docker-images-using-jre-base-3jif"&gt;creating compact images using a JRE base&lt;/a&gt;. The journey was enlightening, but the quest for minimalism in Docker images never truly ends. So, let's embark on a new escapade, this time armed with the mighty &lt;em&gt;jlink&lt;/em&gt; command.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why jlink?
&lt;/h3&gt;

&lt;p&gt;We love our Java applications, but we're not fans of oversized Docker images. &lt;a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/jlink.html" rel="noopener noreferrer"&gt;&lt;code&gt;jlink&lt;/code&gt;&lt;/a&gt; steps in to shrink the footprint by creating a runtime that contains only the modules required for our app. Smaller images mean faster downloads, quicker startups, and happier users.&lt;/p&gt;

&lt;p&gt;Before we can use &lt;code&gt;jlink&lt;/code&gt;, we need to determine which JDK modules are required by the application. We need &lt;code&gt;Jdeps&lt;/code&gt;, a Java dependency analysis tool to &lt;a href="https://mbien.dev/blog/entry/custom-java-runtimes-with-jlink" rel="noopener noreferrer"&gt;list all the module dependencies&lt;/a&gt;.&lt;br&gt;
To know more about how to use &lt;code&gt;jdeps&lt;/code&gt; with the Spring Boot project you can look at this &lt;a href="https://dev.to/snyk/using-jlink-to-create-smaller-docker-images-for-your-spring-boot-java-application-3m99"&gt;article&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Run JLink to create a custom Java Runtime
&lt;/h3&gt;

&lt;p&gt;We added the &lt;code&gt;jlink&lt;/code&gt; execution at the build stage. Later in the final stage, will copy the output into the final image.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RUN jlink -v \
    --add-modules java.base,java.logging,java.xml,jdk.unsupported,java.sql,java.naming,java.desktop,java.management,java.security.jgss,java.instrument \
    --strip-debug \
    --compress 2 \
    --no-header-files \
    --no-man-pages \
    --vendor-version="i made this" \
    --output /customjre
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Arguments:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;add-modules&lt;/code&gt; Adds the modules, to the default set of root modules. The module's name was generated by &lt;code&gt;jdeps&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;strip-debug&lt;/code&gt; will &lt;a href="https://medium.com/@david.delabassee/jlink-stripping-out-native-and-java-debug-information-507e7b587dd7" rel="noopener noreferrer"&gt;remove debugging information&lt;/a&gt; from the output runtime image.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;compress=0|1|2&lt;/code&gt; Enable compression of resources: 0= no compression, 1= string deduplication, 2= zip-compressed. &lt;a href="https://mbien.dev/blog/entry/custom-java-runtimes-with-jlink" rel="noopener noreferrer"&gt;This might influence startup time slightly&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;vendor-version="I made this"&lt;/code&gt; will appear on the second line of the output of &lt;code&gt;java -version&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;no-header-files&lt;/code&gt; Excludes header files.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;no-man-pages&lt;/code&gt; Excludes man pages.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;output&lt;/code&gt; Specifies the location of the generated runtime image.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;After creating the custom JRE, we copy it into the JAVA_HOME of the final stage. The full dockerfile can be found &lt;a href="https://github.com/alifruliarso/spring-boot-online-survey/blob/main/jlink.Dockerfile" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM alpine:3.18.4
ENV JAVA_HOME /user/java/jdk21
ENV PATH ${JAVA_HOME}/bin:$PATH
COPY --from=java-build /customjre ${JAVA_HOME}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After rebuilding the docker image, here is the final result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx1osh9cfj47t9fmpagl4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx1osh9cfj47t9fmpagl4.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We reduced the image size from 232MB to 98 MB. Finally, we have a smaller docker image of the Spring Boot application using Alpine Linux and Open JDK21.&lt;/p&gt;

</description>
      <category>java</category>
      <category>springboot</category>
      <category>docker</category>
      <category>container</category>
    </item>
    <item>
      <title>Spring Boot Docker Images using JRE base</title>
      <dc:creator>Alif Ruliarso</dc:creator>
      <pubDate>Mon, 06 Nov 2023 14:10:52 +0000</pubDate>
      <link>https://dev.to/alifrul/spring-boot-docker-images-using-jre-base-3jif</link>
      <guid>https://dev.to/alifrul/spring-boot-docker-images-using-jre-base-3jif</guid>
      <description>&lt;p&gt;This is my attempt at creating a smaller Docker image for my &lt;a href="https://github.com/alifruliarso/spring-boot-online-survey" rel="noopener noreferrer"&gt;Spring Boot application&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Development images
&lt;/h2&gt;

&lt;p&gt;As a starting point, I use the Maven docker image based on Alpine Linux.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM maven:3.9.5-eclipse-temurin-21-alpine
RUN mkdir /app
WORKDIR /app

COPY pom.xml ./
RUN mvn dependency:go-offline

COPY docker-entrypoint-dev.sh ./
COPY src ./src
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;docker-entrypoint-dev.sh&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash
export TERM=xterm
echo "wait 5s"
sleep 5

mvn spring-boot:run -Dspring-boot.run.jvmArguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" &amp;amp;

while true; do
    watch -d -t -g "ls -lR . | sha1sum" &amp;amp;&amp;amp; mvn compile
done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above script executes &lt;code&gt;spring-boot:run&lt;/code&gt;, then watch for source code changes, and compiles the Java code.&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;The watch command executes a program periodically, showing output fullscreen&lt;/li&gt;
&lt;li&gt;The -d (--difference) option to view the changing output. This option will highlight the changes.&lt;/li&gt;
&lt;li&gt;The -t (--no-title) option is used to turn off the header showing the interval, command, and the current time&lt;/li&gt;
&lt;li&gt;By default, the watch command keeps running until it is interrupted manually by the user (Ctrl+C).
However, sometimes instead of highlighting the changes, you’d prefer the watch command to exit when a change is detected completely.
We can set watch to exit when the output from the command changes by using the -g (--chgexit) option.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls -lR . | sha1sum&lt;/code&gt; Produces an sha1sum file source code&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Final Image
&lt;/h2&gt;

&lt;p&gt;After building my development image, I want to make the final image for deploying into the server.&lt;br&gt;
To make the image smaller, I use the layering feature and multi-stage build.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Dockerfile&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM maven:3.9.5-eclipse-temurin-21-alpine AS java-build

WORKDIR /app/

COPY .mvn/ .mvn
COPY pom.xml ./
RUN mvn dependency:go-offline

COPY src src
RUN mvn package
RUN mkdir -p target/dependency &amp;amp;&amp;amp; (cd target/dependency; jar -xf ../*.jar)

FROM eclipse-temurin:21-jre-alpine

COPY --from=java-build /etc/passwd /etc/shadow /etc/
ARG DEPENDENCY=/app/target/dependency
# dependencies
COPY --from=java-build ${DEPENDENCY}/BOOT-INF/lib /app/lib
# metadata
COPY --from=java-build ${DEPENDENCY}/META-INF /app/META-INF
# java classes
COPY --from=java-build ${DEPENDENCY}/BOOT-INF/classes /app

ENV _JAVA_OPTIONS "-XX:MaxRAMPercentage=90 -Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true -Dfile.encoding=UTF-8"
ENTRYPOINT ["java","-cp","app:app/lib/*","com.galapea.techblog.springboot.onlinesurvey.SpringbootOnlineSurveyApplication"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;First stage: extract the content of our fat Jar.&lt;/li&gt;
&lt;li&gt;Second stage: copy application layers into the final docker image which only contains jre&lt;/li&gt;
&lt;li&gt;Finally, run Java with a classpath definition, instead of a link to a JAR.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After making small code changes, I rebuilt the docker image, the previous layer didn't change &lt;code&gt;java-build 2 to 5/8&lt;/code&gt;, taking advantage of the Docker cache (&lt;code&gt;=&amp;gt; CACHED&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;[+] Building 34.1s (19/19) FINISHED                                                                                                                                                              docker:default
&lt;/span&gt;&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;survey-app internal] load build definition from Dockerfile                                                                                                                                            0.1s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; transferring dockerfile: 839B                                                                                                                                                                       0.0s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;survey-app internal] load .dockerignore                                                                                                                                                               0.0s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; transferring context: 177B                                                                                                                                                                          0.0s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;survey-app internal] load metadata &lt;span class="k"&gt;for &lt;/span&gt;docker.io/library/maven:3.9.5-eclipse-temurin-21-alpine                                                                                                        1.1s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;survey-app internal] load metadata &lt;span class="k"&gt;for &lt;/span&gt;docker.io/library/eclipse-temurin:21-jre-alpine                                                                                                                1.1s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;survey-app java-build 1/8] FROM docker.io/library/maven:3.9.5-eclipse-temurin-21-alpine@sha256:c0f2d9ba99a1a3a0c95bdd7b1888fff4183e06fe8c5c3c8cb0c19dc7d1ab893b                                       0.0s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;survey-app stage-1 1/5] FROM docker.io/library/eclipse-temurin:21-jre-alpine@sha256:2a4755c16fe3390e6a89daed9adfc6d9dc7be116dfce84497cf84f761b973311                                                  0.0s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;survey-app internal] load build context                                                                                                                                                               0.0s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; transferring context: 8.94kB                                                                                                                                                                        0.0s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;CACHED &lt;span class="o"&gt;[&lt;/span&gt;survey-app java-build 2/8] WORKDIR /app/                                                                                                                                                       0.0s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;CACHED &lt;span class="o"&gt;[&lt;/span&gt;survey-app java-build 3/8] COPY .mvn/ .mvn                                                                                                                                                     0.0s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;CACHED &lt;span class="o"&gt;[&lt;/span&gt;survey-app java-build 4/8] COPY pom.xml ./                                                                                                                                                     0.0s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;CACHED &lt;span class="o"&gt;[&lt;/span&gt;survey-app java-build 5/8] RUN mvn dependency:go-offline                                                                                                                                       0.0s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;survey-app java-build 6/8] COPY src src                                                                                                                                                               0.1s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;survey-app java-build 7/8] RUN mvn package                                                                                                                                                           30.5s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;survey-app java-build 8/8] RUN &lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; target/dependency &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;target/dependency&lt;span class="p"&gt;;&lt;/span&gt; jar &lt;span class="nt"&gt;-xf&lt;/span&gt; ../&lt;span class="k"&gt;*&lt;/span&gt;.jar&lt;span class="o"&gt;)&lt;/span&gt;                                                                                                 1.6s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;CACHED &lt;span class="o"&gt;[&lt;/span&gt;survey-app stage-1 2/5] COPY &lt;span class="nt"&gt;--from&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;java-build /etc/passwd /etc/shadow /etc/                                                                                                                   0.0s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;CACHED &lt;span class="o"&gt;[&lt;/span&gt;survey-app stage-1 3/5] COPY &lt;span class="nt"&gt;--from&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;java-build /app/target/dependency/BOOT-INF/lib /app/lib                                                                                                    0.0s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;CACHED &lt;span class="o"&gt;[&lt;/span&gt;survey-app stage-1 4/5] COPY &lt;span class="nt"&gt;--from&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;java-build /app/target/dependency/META-INF /app/META-INF                                                                                                   0.0s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;survey-app stage-1 5/5] COPY &lt;span class="nt"&gt;--from&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;java-build /app/target/dependency/BOOT-INF/classes /app                                                                                                           0.1s
&lt;span class="gp"&gt; =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;survey-app] exporting to image                                                                                                                                                                        0.1s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the final docker image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp4hgj64usxuwxaaf5acm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp4hgj64usxuwxaaf5acm.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the next iteration, I will try to use Jlink.&lt;/p&gt;

</description>
      <category>java</category>
      <category>docker</category>
      <category>springboot</category>
      <category>container</category>
    </item>
    <item>
      <title>Clickhouse - Getting started with Docker</title>
      <dc:creator>Alif Ruliarso</dc:creator>
      <pubDate>Fri, 23 Dec 2022 14:15:59 +0000</pubDate>
      <link>https://dev.to/alifrul/clickhouse-getting-started-with-docker-19ei</link>
      <guid>https://dev.to/alifrul/clickhouse-getting-started-with-docker-19ei</guid>
      <description>&lt;p&gt;&lt;a href="https://clickhouse.com/"&gt;Clickhouse&lt;/a&gt; is a popular open-source column-oriented database management system that is designed for fast analytical queries and real-time data processing. It is particularly well-suited for handling large volumes of data and has been used by companies like Yandex, Alibaba, and Uber for their data warehousing and analytics needs.&lt;/p&gt;

&lt;p&gt;This is a simple guide to playing with Clickhouse.&lt;/p&gt;

&lt;h3&gt;
  
  
  Run clickhouse server
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -d \
        -v $(realpath ./ch_data):/var/lib/clickhouse/ \
        -v $(realpath ./ch_logs):/var/log/clickhouse-server/ \
        --name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The server should be started after downloading Clickhouse image.&lt;/p&gt;

&lt;h3&gt;
  
  
  Start clickhouse client
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -it --rm --link some-clickhouse-server:clickhouse-server --entrypoint clickhouse-client clickhouse/clickhouse-server --host clickhouse-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will open a Clickhouse client session, and you can start issuing commands to the Clickhouse server. Let's test the following query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SHOW DATABASES
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT version()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Stop clickhouse server
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker stop some-clickhouse-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Start existing clickhouse server
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker start some-clickhouse-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>clickhouse</category>
      <category>tutorial</category>
      <category>docker</category>
    </item>
  </channel>
</rss>
