<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by toonsquare.tech on Medium]]></title>
        <description><![CDATA[Stories by toonsquare.tech on Medium]]></description>
        <link>https://medium.com/@toonsquare.tech?source=rss-d8d97f085043------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OmywVG4WFQBIqtk7Hy95aA.jpeg</url>
            <title>Stories by toonsquare.tech on Medium</title>
            <link>https://medium.com/@toonsquare.tech?source=rss-d8d97f085043------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 10:18:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@toonsquare.tech/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Tooning Chat now supports parsing HWP files.]]></title>
            <link>https://medium.com/toonsquare-tech/tooning-chat-now-supports-parsing-hwp-files-7fc2cfc53176?source=rss-d8d97f085043------2</link>
            <guid isPermaLink="false">https://medium.com/p/7fc2cfc53176</guid>
            <category><![CDATA[hwp]]></category>
            <category><![CDATA[한글]]></category>
            <category><![CDATA[투닝]]></category>
            <category><![CDATA[tooning-chat]]></category>
            <category><![CDATA[tooning]]></category>
            <dc:creator><![CDATA[toonsquare.tech]]></dc:creator>
            <pubDate>Fri, 27 Feb 2026 10:30:53 GMT</pubDate>
            <atom:updated>2026-02-27T10:30:53.826Z</atom:updated>
            <content:encoded><![CDATA[<p>The HWP word processor is widely used by teachers and government employees in South Korea.</p><p>HWP is similar to MS Word and is a prominent, government-supported software in South Korea, with extensive adoption in educational and governmental institutions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/0*s5UgDSnY7Y2u8tkH" /></figure><p>This update aims to support educators who frequently use Tooning Chat.</p><p>Users can now upload HWP files and receive summarized information extracted from these documents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/0*jKq1dRw66-39sVwa" /></figure><p>This feature represents an initial step in supporting teachers who utilize HWP in classrooms across South Korea. Future updates will enable users to download and edit HWP files directly within the browser.</p><p>The following libraries have been utilized to implement this feature:</p><p>Libraries</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/0*8gNP3E0sqKFd0uBT" /></figure><p>Supported Formats</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*k_0yoAmtmHuCNFL3" /></figure><p>Scope of HWP Extraction</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*Zbk93ctVorhsnYYA" /></figure><p>This is just the beginning. We’re committed to building tools that make educators’ lives easier, and HWP support is a meaningful first step. Have ideas or feedback? Reach out to us — your input shapes what we build next.</p><p>Sources:<br> — <a href="https://github.com/hahnlee/hwp.js">https://github.com/hahnlee/hwp.js</a><br> — <a href="https://www.npmjs.com/package/hwp.js/v/0.0.1">https://www.npmjs.com/package/hwp.js/v/0.0.1</a><br> — <a href="https://hanlee.io/hwp.js/">https://hanlee.io/hwp.js/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7fc2cfc53176" width="1" height="1" alt=""><hr><p><a href="https://medium.com/toonsquare-tech/tooning-chat-now-supports-parsing-hwp-files-7fc2cfc53176">Tooning Chat now supports parsing HWP files.</a> was originally published in <a href="https://medium.com/toonsquare-tech">toonsquare.tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Toonsquare Releases AI Model Based on Kim Hong-do’s Artistic Style for Free ]]></title>
            <link>https://medium.com/toonsquare-tech/toonsquare-releases-ai-model-based-on-kim-hong-dos-artistic-style-for-free-6126956d53b1?source=rss-d8d97f085043------2</link>
            <guid isPermaLink="false">https://medium.com/p/6126956d53b1</guid>
            <dc:creator><![CDATA[toonsquare.tech]]></dc:creator>
            <pubDate>Wed, 11 Feb 2026 01:07:37 GMT</pubDate>
            <atom:updated>2026-02-11T01:08:39.782Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Toonsquare</strong>, an AI-based content creation company from Samsung Electronics’ C-Lab, has officially released its new AI model. This model has learned the artistic style of <strong>Kim Hong-do</strong>, the legendary painter of the Josun(조선) Dynasty. It is now available for free on the global AI platform <strong>Hugging Face</strong>.</p><p><a href="https://huggingface.co/toonsquare/kim-hong-do">toonsquare/kim-hong-do · Hugging Face</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/0*zAobVfrDUhzhpkUg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/0*h18hUhwDHB27tyk1.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/0*R5ayS6sQn7YQhMH_.png" /></figure><p><strong>Key Highlights:</strong></p><ul><li><strong>Sovereign AI:</strong> This project is part of a government R&amp;D effort to lead the digital transformation of traditional art and strengthen “Sovereign AI” (technological sovereignty).</li><li><strong>Tooning Magic:</strong> Users can easily create Kim Hong-do style images by typing simple text into the ‘Tooning Magic’ service.</li><li><strong>Proven Success:</strong> The model was used at the ‘Ansan Street Arts Festival’ in May 2025, receiving great feedback from the public.</li><li><strong>Open Access:</strong> It is released under the CreativeML Open License. Anyone can download, modify, and use it for commercial purposes for free. (Unethical use is strictly prohibited.)</li></ul><p><strong>A Word from Our CTO:</strong></p><blockquote><em>“Bringing traditional art into the modern era through AI makes creativity accessible to everyone. This is a big step for Sovereign AI and the democratization of creation.” — Branden Choi</em><strong><em>, CTO of Toonsquare</em></strong></blockquote><p>Toonsquare is expanding into global markets like the USA and Japan with <strong>Tooning Plus</strong>. We will continue to innovate in Edutech and web-content fields! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6126956d53b1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/toonsquare-tech/toonsquare-releases-ai-model-based-on-kim-hong-dos-artistic-style-for-free-6126956d53b1">Toonsquare Releases AI Model Based on Kim Hong-do’s Artistic Style for Free 🎨</a> was originally published in <a href="https://medium.com/toonsquare-tech">toonsquare.tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Toonsquare in CES]]></title>
            <link>https://medium.com/toonsquare-tech/toonsquare-in-ea6e8d68db2d?source=rss-d8d97f085043------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea6e8d68db2d</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[ces]]></category>
            <category><![CDATA[ces-2024]]></category>
            <category><![CDATA[stable-diffusion]]></category>
            <dc:creator><![CDATA[toonsquare.tech]]></dc:creator>
            <pubDate>Thu, 11 Jan 2024 01:56:41 GMT</pubDate>
            <atom:updated>2024-01-11T01:56:53.232Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/@tooning.io/report-from-the-valley-of-fire-day-2-of-ces-2024-las-vegas-aa4b24a27bb2">Report from the Valley of Fire: Day 2 of CES 2024, Las Vegas</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea6e8d68db2d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/toonsquare-tech/toonsquare-in-ea6e8d68db2d">Toonsquare in CES</a> was originally published in <a href="https://medium.com/toonsquare-tech">toonsquare.tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Toonsquare in]]></title>
            <link>https://medium.com/@toonsquare.tech/toonsquare-in-9d532c7ea6e2?source=rss-d8d97f085043------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d532c7ea6e2</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[ces]]></category>
            <category><![CDATA[ces-2024]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[toonsquare.tech]]></dc:creator>
            <pubDate>Thu, 11 Jan 2024 01:53:44 GMT</pubDate>
            <atom:updated>2024-01-11T01:53:44.622Z</atom:updated>
            <content:encoded><![CDATA[<h3>Toonsquare in CES 2024</h3><p><a href="https://medium.com/@tooning.io/report-from-the-valley-of-fire-day-2-of-ces-2024-las-vegas-aa4b24a27bb2">Report from the Valley of Fire: Day 2 of CES 2024, Las Vegas</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d532c7ea6e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chrome Inspector 200% 활용]]></title>
            <link>https://medium.com/toonsquare-tech/chrome-inspector-200-%ED%99%9C%EC%9A%A9-2f2176addb54?source=rss-d8d97f085043------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f2176addb54</guid>
            <category><![CDATA[chrome]]></category>
            <category><![CDATA[개발자도구]]></category>
            <category><![CDATA[크롭개발자도구]]></category>
            <category><![CDATA[inspector]]></category>
            <category><![CDATA[크롬]]></category>
            <dc:creator><![CDATA[toonsquare.tech]]></dc:creator>
            <pubDate>Sun, 08 Aug 2021 07:53:18 GMT</pubDate>
            <atom:updated>2021-08-08T08:20:42.993Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong><em>개발자도구 No.1</em></strong></blockquote><p>개발자라면 가장 많이 사용하는 것 중 하나가 <strong>chrome 개발자 도구</strong>이다.</p><p>개인적으로 개발자도구의 활용도에 따라 <strong>개발의 효율, 웹 페이지의 성능</strong>까지 큰 차이를 보일 것이라고 생각한다. 그래서 이 글을 준비했고, 글을 준비하는 동안 정말 많은 기능이 있다는 것을 알게 되었다. 이제까지 단순 debugger 만 찍고, value 값만 확인하는 용도로만 사용했다는 것에 아쉬움을 표하고 싶다.</p><p><strong>처음 접해본 기능</strong> 혹은 <strong>중요한 기능</strong>이라고 판단하는 것을 기준으로 글을 작성할 것이다.</p><blockquote><strong><em>INDEX</em></strong></blockquote><ol><li>Element</li><li>Console</li><li>Sources</li><li>NetWork</li><li>Performance</li><li>Memory</li><li>Security</li><li>Lighthouse</li></ol><blockquote><strong><em>1. Element</em></strong></blockquote><p>Element 탭에서는 html에 대한 값을 확인하고, 변경하고 분석하는 용도로 많이 사용이 된다. 기능에 대해서 하나씩 살펴보자.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/0*BwM6jYOaPRlEyo9M.png" /></figure><h4>1–1 <strong>Add Attribute, edit Attribute, edit as HTML</strong></h4><p>해당 태그를 손쉽게 추가하고 수정하는 데에 이용이된다. editor에서 직접 수정하면 파싱이나 리로딩이 필요한 경우가 있지만, 개발자 도구를 통해 고치면 바로 바로 변경하고 확인 할 수 있어 시간이 절약된다.</p><h4>1–2 <strong>duplicate element, delete element</strong></h4><p>해당 태그를 복제하거나 삭제하는 데에 이용이 된다.</p><p>여기서 추가적인 기능도 설명한다면,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/0*8kGeKf5eSUuFOw75.png" /></figure><p>여기서 <strong>우측 상단 :hov를 활성화 시키고 ‘h’ 키보드를 클릭하면 해당 요소가 hide</strong>된다.</p><h4>1–3 <strong>Copy</strong></h4><p>copy에서도 여러 copy가 존재한다. 유용할만한 것을 소개해보면,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/165/0*tXScB9so4CmPxmNK.png" /></figure><p>이 세가지가 되지 않을가 생각이든다. 선택한 요소에 대한 path, style을 손쉽게 copy해서 가져올 수 있다.</p><p>ex )</p><p><strong>- </strong>Copy selector : <br>#main-content &gt; app-template-list &gt; ion-content &gt; div:nth-child(1) &gt; div &gt; div</p><p>- Copy JS path : <br>document.querySelector(“#main-content &gt; app-template-list &gt; ion-content &gt; div:nth-child(1) &gt; div &gt; div”)</p><p>- Copy styles : <br>text-align: left;<br> — side-width: 100%;<br> — border: 1px solid var( — ion-item-border-color, var( — ion-border-color, var( — ion-color-step-</p><h4>1–4 <strong>break on</strong></h4><p>break on에서는 html의 요소가 변경될 때 break 가 걸린다.<br>옵션</p><p><strong>- 하위 태그가 변경될 때</strong></p><p><strong>- 속성이 변경될 때</strong></p><p><strong>- node가 지워질 때</strong></p><p>이 이외에도 노드 캡처, 노드 temp에 저장 등의 기능은 있지만 이 부분은 생략한다.</p><p><strong>추가로</strong> Element탭에서 가장 좋다고 생각하는 기능은 styles 탭에서</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/267/0*v_KDAIsCZuKJn2qv.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/234/0*aPHsXeLIX9SXd6B8.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/246/0*NjHLc1WYy5t0JKXT.png" /></figure><p><strong>컬러 팔레트, 그림자, 박스 border 처리 등에 대한 ui 제공</strong>이다.</p><p>위의 캡처본과 같이 그림자의 값을 줄 때, 그림자 위치를 코드로 조정하는 것이 아니라 ui를 통해 조절하고 코드에 넣는 방식으로 할 수 있게 제공해준다. 엄청 간편하다.</p><p>또한, 컬러에서도 팔레트 제공되는 것 뿐만 아니라, 컬러 픽커가 있어 해당 되는 페이지에서 원하는 색을 손쉽게 추출할 수 있다.</p><blockquote><strong><em>2. Console</em></strong></blockquote><p>console은 크롬 브라우저 v8엔진을 통해 손쉽게 스크립트를 사용할 수 있는 공간이다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/120/0*VYjfJtWQ7I54_sHW.png" /></figure><p>간단하지만, 예시를 보면, 변수를 할당하고, 계산을 할 수 있다. break point와 함께 이를 이용하면 더욱 개발하는 데에 있어 좋을 것이다.</p><p>추가적으로 위 캡처에서 보이듯이<strong> $_ 은 마지막 값</strong>을 의미한다.</p><blockquote><strong><em>3. Sources</em></strong></blockquote><p>sources tab에서는 js 파일을 확인하고 값을 분석하는 데에 이용이된다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*D81_UFll1cQl53gK.png" /></figure><p>debugger를 통해 break 상태를 만들어 놓았다.</p><p>break 상태에서 이제 <strong>값이 어떻게 들어오는지, callStack이 어떻게 쌓이고</strong> 있는지 등을 파악할 수 있다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/0*gfA80-5-2c_CaFS8.png" /></figure><p>추가적으로 break 상태에서 debugging에 대한 tip을 제공하면,</p><p>왼쪽 line 부분을 우클릭 하여 모달을 활성화 시키면 캡처본과 같이 나온다.</p><p>이 기능을 활용하면 매우 효과적인 debugging을 실행할 수 있다.</p><p>유용하게 사용할만한 기능은</p><p><strong>add conditional breakpoint</strong>이다</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/0*29hiNxyOZoGZyrQk.png" /></figure><p>for 문안에서 break를 걸면, 모든 반복에서 break가 걸린다. 이렇게 되면 불필요한 시간을 낭비하게 된다.</p><p>이를 해결할 수 있는 것이 <strong>add conditional breakpoint</strong>이다. 조건에 맞을 때 break가 걸린다.</p><p>예를 들어 index === 3 인 조건을 걸면, index === 3일 때만 break가 걸린다.</p><p>이러한 모든 break에 관련된 정보는 우측텝에서 확인이 가능하며, 이 뿐만 아니라, <strong>Event에 대한 breakpoint, global listeners 등에 대한 break</strong>를 설정할 수 있다.</p><blockquote><strong><em>4. NetWork</em></strong></blockquote><p>network tab에서는 서버와 통신하는 모든 데이터에 대해 기록을 남겨준다. css, js, img 등</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GpFHnWq78gcyP6K4.png" /></figure><p>네트워크 탭에서 <strong>record</strong>를 키고, 캡처본 우측 상단 톱니바퀴를 활성화하고,<strong> capture screenshots</strong>을 체크 후 페이지 로딩을 해보자.</p><p><strong>screenshots</strong>의 결과물이 나오고 각각의 screenshot에 대한 정보를 체크할 수 있다. 로딩 시간이 얼마나 걸렸는지, 해당 screenshot에서는 어떤 데이터를 가져왔는지 등을 파악할 수 있다.</p><p>또한, 좌측에서 여러 기능들을 체크해보자.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*r46lR_vO7nxX3vSO.png" /></figure><p>어느정도 유용하게 쓸만한 것에 대해 살펴보면,</p><p><strong>Header Options</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/0*aB6nDhBdtcPBOsZ9.png" /></figure><p><strong>Option</strong>에 <strong>체크 사항</strong>에 따라 아래에 보여주는 영역을 확장해준다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Vh-iiNmbgvbRvjbS.png" /></figure><p><strong>Replay XHR</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/239/0*6hymNjb8RBFlsv4H.png" /></figure><p>이는 해당 요청을 손쉽게 재요청 할 수 있는 기능이다.</p><p><strong>IMG DATA</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EYkgpUMO4VHl9wMV.png" /></figure><p>이미지의 경우 이미지에 대한 데이터를 얻을 수 있는 기능도 존재하다.</p><p><strong>Preview tab에서 우클릭하게 되면 img url, data url, img save </strong>등의 기능을 제공해준다.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f2176addb54" width="1" height="1" alt=""><hr><p><a href="https://medium.com/toonsquare-tech/chrome-inspector-200-%ED%99%9C%EC%9A%A9-2f2176addb54">Chrome Inspector 200% 활용</a> was originally published in <a href="https://medium.com/toonsquare-tech">toonsquare.tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker를 사용하여 MySQL 설치하기]]></title>
            <link>https://medium.com/toonsquare-tech/%EB%8F%84%EC%BB%A4-mysql-%EC%9D%B4%EB%AF%B8%EC%A7%80%EB%A1%9C-%EB%A1%9C%EC%BB%AC-%EB%94%94%EB%B9%84-%EC%9D%B4%EC%9A%A9%ED%95%98%EA%B8%B0-e9296090b61e?source=rss-d8d97f085043------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9296090b61e</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artficial-intelligence]]></category>
            <category><![CDATA[content]]></category>
            <category><![CDATA[toon]]></category>
            <category><![CDATA[webtoon]]></category>
            <dc:creator><![CDATA[toonsquare.tech]]></dc:creator>
            <pubDate>Sun, 25 Jul 2021 12:13:31 GMT</pubDate>
            <atom:updated>2022-05-26T02:12:35.178Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong><em>로컬 디비 환경 구축을 위해 Docker 를 이용하게 된 계기</em></strong></blockquote><p>저희 팀은 클라우드에 있는 개발 DB 로 작업을 하고 있습니다. 그러다보면 문제점이 생길 수 있는데요.</p><p>여러명이 하나의 DB를 바라보고 있으면 내가 고치지도 않은 테이블의 스키마가 바뀌어 있고, 나는 분명 A 테이블에 데이터를 넣었는데, 다른 개발자가 테스트를 위해 A 테이블의 데이터를 전부 날려버리면 난감한 상황이 생기기 시작하는거죠.</p><p>그래서 로컬에다가 각자 DB 환경을 구축하려 하는데요. <strong>그렇다면 DB를 각자 로컬에다가 알아서 깔면 되는데, 왜 Docker 를 이용해서 까는걸까요?</strong></p><blockquote><strong><em>도커 구조</em></strong></blockquote><p>도커를 이용하기 이전에, 도커가 어떤 구조로 이루어져 있는지 봅시다.</p><p>도커는<strong> server-client 구조</strong>를 띄고 있습니다.</p><p>하나는 클라이언트로서의 도커이고, 다른 하나는 서버로서의 도커입니다. <strong>실제로 컨테이너를 생성하고 실행하며 이미지를 관리하는 주체는 도커 서버</strong>입니다. 도커 엔진은 외부에서 API 입력을 받아 도커 엔진의 기능을 수행하는데, 도커 프로세스가 실행되어 서버로서 입력을 받을 준비가 된 상태를 <strong>도커 데몬</strong>이라고 합니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gnDuNBkMbYzf5_sKzsr0wA.png" /></figure><p>도커가 설치된 호스트에 접속해 docker 명령어를 입력하면 아래와 같은 과정으로 도커가 제어됩니다.</p><ol><li>사용자가 docker ps 와 같은 도커 명령어를 입력합니다.</li><li>/usr/bin/docker 는 /var/run/docker.sock 유닉스 소켓을 사용해 도커 데몬에게 명령어를 전달합니다.</li><li>도커 데몬은 이 명령어를 파싱하고 명령어에 해당하는 작업을 수행합니다.</li><li>수행 결과를 도커 클라이언트에게 반환하고 사용자에게 결과를 출력합니다.</li></ol><p>그럼, 도커 엔진에서 가장 중요한 개념인 ‘이미지’ 와 ‘컨테이너’ 는 무엇일까요?</p><p><strong>(1) 이미지</strong></p><ul><li>이미지는 컨테이너를 생성할 때 필요한 요소이며, 가상 머신을 생성할 때 사용하는 iso 파일과 비슷한 개념입니다.</li><li>도커 이미지는 우분투, CentOS 등 기본적인 리눅스 운영체제부터 아파치 웹 서버, MySQL 데이터베이스 등의 각종 애플리케이션까지 갖가지 종류가 있습니다.</li></ul><p><strong>(2) 컨테이너</strong></p><ul><li>이미지를 가지고 컨테이너를 생성할 수 있는데, 컨테이너를 생성하면 해당 이미지의 목적에 맞는 파일이 들어 있는 파일 시스템을 가진 <strong>독립된 공간</strong>이 만들어집니다.</li><li>컨테이너는 이미지에서 변경된 사항만 컨테이너 계층에 저장하므로 컨테이너에서 무엇을 하든지 <strong>원래 이미지는 영향을 받지 않습니다</strong>.</li></ul><blockquote><strong><em>설치 과정</em></strong></blockquote><ul><li>이 과정은 macOS Big Sur 11.5 에서 진행되었습니다.</li></ul><p>OS 에 따라 도커 설치 방법은 조금씩 다릅니다. mac 기준으로 아래 공식 홈페이지에서 다운받을 수 있습니다.</p><p><a href="https://docs.docker.com/docker-for-mac/install/">Install Docker Desktop on Mac</a></p><p>이제 도커를 이용해 MySQL 이미지를 다운받아 커스터마이징해서 우리만의 MySQL 이미지로 만들고, 팀원 모두와 공유할 수 있도록 docker hub 에 배포해 볼 것입니다.</p><p>여기서 주의할 점은, <strong>컨테이너는 한 번 삭제가 되면 컨테이너 계층에 저장돼있던 데이터베이스의 정보도 삭제됩니다</strong>. 고로, 실수로 컨테이너를 삭제하면 데이터를 복구할 수 없게 됩니다.</p><p>이를 방지하기 위해 호스트의 특정 경로에 디비 dump 파일을 넣어놓고, 도커 컨테이너로 해당 dump 파일이 마운트 되도록 설정할 것입니다.</p><p>도커를 사용하기에 앞서 설치된 도커 엔진의 버전을 확인합니다.</p><pre>$ docker -v<br>Docker version 20.10.5, build 55c4c88</pre><p>MySQL 5.7.30 컨테이너를 생성합니다.</p><pre>$ docker run -d \<br>--name local-mysql<br>-e MYSQL_ROOT_PASSWORD=password \ <br>-e MYSQL_DATABASE=tooning \<br>mysql:5.7.30</pre><ul><li><strong>-d</strong> : detached 모드로 컨테이너를 실행합니다. detached 모드는 컨테이너를 백그라운드에서 동작하는 애플리케이션으로써 실행하도록 설정합니다.</li><li><strong>— name </strong>: 컨테이너의 이름을 설정합니다.</li><li><strong>-e</strong> : 컨테이너 내부의 환경 변수를 설정합니다.</li><li><strong>mysql:5.7.30 </strong>: 사용할 이미지 명입니다.</li></ul><p>컨테이너가 제대로 실행됐는지 확인하기 위해 docker ps 명령어로 확인합니다.</p><pre>$ docker ps<br>CONTAINER ID   IMAGE          COMMAND                  CREATED         STATUS         PORTS                 NAMES<br>10feeda4e95f   mysql:5.7.30   &quot;docker-entrypoint.s…&quot;   7 seconds ago   Up 7 seconds   3306/tcp, 33060/tcp   local-mysql</pre><p>이제, MySQL 환경변수 설정을 살짝 변경해보려 합니다.</p><p>docker exec 명령어를 사용하여 MySQL 컨테이너 내부에서 /bin/bash 프로세스를 실행합니다. 컨테이너 내부로 들어가는 작업입니다.</p><pre>$ docker exec -it local-mysql /bin/bash</pre><p>max_allowed_packet 을 늘려주는 작업을 해줄 건데요. MySQL 의 환경변수 파일이 위치한 /etc/mysql/mysql.conf.d 경로로 가서 max_allowed_packet 을 지정해주었습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2mtpOqMLU2SXC_g_tFMmJA.png" /></figure><p>이제 MySQL 컨테이너 안에서 설정한 내용까지 통째로 이미지로 만들어보겠습니다. 작업한 컨테이너 local-mysql을 mysql:tooning 이라는 이미지로 생성합니다.</p><pre>$ docker commit local-mysql mysql:tooning</pre><p><strong>그런데 기존에 도커 허브에서 다운받은 </strong><strong>mysql:5.7.30 이미지와 직접 만든 </strong><strong>mysql:tooning 이미지가 뭐가 다른건지는 어떻게 확인할 수 있을까요?</strong></p><p>docker inspect 명령어를 이용하면 컨테이너, 이미지 등 모든 도커 단위의 정보를 확인할 수 있습니다.</p><pre>$ docker inspect mysql:5.7.30<br>$ docker inspect mysql:tooning</pre><p>다음 그림은 각 이미지에 대한 inspect 명령어의 출력 결과 중 Layers 항목만 나타낸 것입니다.</p><ul><li>mysql:5.7.30 이미지의 Layer</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cGYMX-fxeYKwD4NmepvZKQ.png" /></figure><ul><li>mysql:tooning 이미지의 Layer</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e-wKwgubsRWSflE-z6pPcg.png" /></figure><p>기존의 mysql:5.7.30 이미지에서 변경된 사항만 새로운 레이어로 저장이 되어 mysql:tooning 이미지로 생성된 것을 확인할 수 있습니다.</p><p><strong>즉, MySQL 환경설정 파일에서 max_allowed_packet 을 지정해준 것에 대한 변경사항이 하나의 Layer 로 추가된 것입니다</strong>.</p><p>이제 팀원들과 공유할 수 있도록 새로 생성한 이미지를 저장소에 올려볼 건데요. 좀 전에 커밋해둔 mysql:tooning 이라는 이름으로는 이미지를 저장소에 올릴 수 없습니다. 이미지를 올리려면 저장소 이름을 앞에 붙여줘야 합니다. docker tag 명령어를 사용하면 이미지의 이름을 추가할 수 있습니다.</p><pre>$ docker tag mysql:tooning 저장소이름/mysql:tooning</pre><p>docker images 명령어를 이용해 image 가 제대로 생성되었는지 확인해봅시다.</p><pre>$ docker images<br>REPOSITORY      TAG       IMAGE ID       CREATED         SIZE<br>저장소이름/mysql   tooning   9fce79844e8f   6 seconds ago   499MB<br>mysql           5.7.30    9cfcce23593a   13 months ago   448MB</pre><p>push 명령어를 입력해 이미지를 저장소에 올려보겠습니다.</p><pre>$ docker push 저장소이름/mysql:tooning</pre><p>docker hub 저장소로 가보면, 이미지가 제대로 들어온 것을 확인할 수 있습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5hSdzdz_loxmAUXlD7YH5g.png" /></figure><p>이제 마지막 단계로, 방금 저장소에 올린 도커 이미지를 다운받아서 로컬에 미리 다운받아 놓은 dump 파일을 컨테이너에서 마운트 하도록 설정해줄 것입니다. 그러려면 특정 경로에 db dump 파일을 미리 만들어 놓아야 합니다. 저는 /var/db_dump/dev 위치에 덤프 파일을 만들어 놓았습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*n7jWkVPz-85DpZlPTqEuCw.png" /></figure><p>정확한 테스트를 위해, 기존에 로컬에 있던 이미지를 전부 삭제하고 도커에서 pull 명령어를 입력해서 이미지를 다운받습니다.</p><pre>$ docker pull 저장소이름/mysql:tooning</pre><p>다운받은 이미지를 컨테이너로 띄웁니다.</p><pre>$ docker run -d \<br>--name local-mysql <br>-e MYSQL_ROOT_PASSWORD=password \ <br>-e MYSQL_DATABASE=tooning \<br>-v /var/db_dump/dev:/docker-entrypoint-initdb.d<br>저장소이름/mysql:tooning</pre><p>처음에 mysql:5.7.30 이미지를 컨테이너로 띄웠을 때와는 다르게, 새로 추가된 <strong>-v 옵션</strong>이 있습니다. 호스트의 특정 경로를 컨테이너로 마운트 시키는 옵션입니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*6JrcnmQskE4nTnihwotqLg.png" /></figure><p>즉, 호스트의 /var/db_dump/dev 경로가 컨테이너의 /docker-entrypoint-initdb.d 경로로 마운트 되도록 설정해준 것입니다. dump 파일을 /var/db_dump/dev 경로에 넣어준 상태이므로, 컨테이너가 생성되면서 /docker-entrypoint-initdb.d 경로에 dump 파일이 마운트 될 것 입니다.</p><p><strong>왜 </strong><strong>/docker-entrypoint-initdb.d 경로에 dump 파일을 넣게 지정해줬을까요?</strong></p><p><a href="https://hub.docker.com/_/mysql"><strong>mysql official image</strong></a> 의 description 을 보면, 새로 생성한 database 에 sql dump 를 붓기 위해서는 /docker-entrypoint-initdb.d 경로에 dump 파일을 놓으라고 명시되어 있습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VIDUMSACBS640DAykJcGqQ.png" /></figure><p>다시 본론으로 돌아가서, 생성된 컨테이너의 /docker-entrypoint-initdb.d 경로에 dump 파일이 정말 존재하는 지 확인해 봅시다.</p><pre>root@a4971a014b01:/docker-entrypoint-initdb.d# ls<br>dev_db.sql</pre><p>위에서 생성해놓은 dev_db.sql 파일이 있는 걸 확인할 수 있습니다.</p><p>MySQL 이 data files 를 가지고 있는 경로인 /var/lib/mysql 로 가보면, dump 파일이 tooning 데이터베이스에 제대로 import 된 것도 확인할 수 있습니다.</p><pre>root@a4971a014b01:/var/lib/mysql# ls<br>performance_schema sys <strong>tooning</strong> <br>...</pre><p>이렇게 Docker 를 이용해 mysql 을 설치하고 이미지를 다시 생성하여 docker hub 에 배포해서, 로컬에 가지고 있던 dump 파일을 컨테이너 안으로 마운트 시키는 작업까지 해보았습니다.</p><p>만약 mysql 을 Docker 를 통하지 않고 로컬에 설치하는 방법을 선택했다면, mysql 의 환경변수를 설정하는 작업을 팀원들이 각자 직접 해야 됐을 것입니다.</p><p>이 실습에서는 간단하게 max_allowed_packet 이라는 변수만 추가해주었지만, 만약 이보다 더 많은 환경 세팅이 들어가야 하는 경우에는 동일한 개발 환경을 구축하기 위해 같은 작업을 반복 해야겠지요.</p><p>하지만 누구 한명이 이미지로 만들어 배포해두면, 각종 라이브러리 설치 등으로 인한 의존성도 걱정할 필요도 없이 이미지를 다운받는 모든 사람이 똑같은 개발 환경을 쉽게 이용할 수 있기 때문에 docker 를 이용하는 게 크나큰 장점이 되겠습니다.</p><h4><strong>출처</strong></h4><ul><li><a href="https://hub.docker.com/_/mysql">https://hub.docker.com/_/mysql</a></li><li><a href="https://docs.docker.com/">https://docs.docker.com/</a></li><li>용찬호, <strong>『시작하세요! 도커/쿠버네티스』</strong>, 위키북스(2020)</li><li>야마다 아키노리, <strong>『도커/쿠버네티스를 활용한 컨테이너 개발 실전 입문』</strong>, 위키북스(2019)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9296090b61e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/toonsquare-tech/%EB%8F%84%EC%BB%A4-mysql-%EC%9D%B4%EB%AF%B8%EC%A7%80%EB%A1%9C-%EB%A1%9C%EC%BB%AC-%EB%94%94%EB%B9%84-%EC%9D%B4%EC%9A%A9%ED%95%98%EA%B8%B0-e9296090b61e">Docker를 사용하여 MySQL 설치하기</a> was originally published in <a href="https://medium.com/toonsquare-tech">toonsquare.tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>