<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Migration Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<atom:link href="https://lycos7560.com/tag/migration/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>생각의 흐름을 타고 다니며 만드는 블로그</description>
	<lastBuildDate>Tue, 25 Nov 2025 15:17:43 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://lycos7560.com/wp-content/uploads/2022/11/cropped-cropped-cropped-log-1-150x150-1-80x80.png</url>
	<title>Migration Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>C# Switch 식(Expression)</title>
		<link>https://lycos7560.com/c/c-switch-%ec%8b%9dexpression/40362/</link>
					<comments>https://lycos7560.com/c/c-switch-%ec%8b%9dexpression/40362/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Tue, 11 Nov 2025 15:02:40 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[!=]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[.NET 5]]></category>
		<category><![CDATA[.NET 6]]></category>
		<category><![CDATA[.Net Core]]></category>
		<category><![CDATA[>=]]></category>
		<category><![CDATA[<=]]></category>
		<category><![CDATA[==]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[2020]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[action]]></category>
		<category><![CDATA[Admin]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Arrow Operator]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Authorization]]></category>
		<category><![CDATA[Boolean]]></category>
		<category><![CDATA[Branch]]></category>
		<category><![CDATA[Branching]]></category>
		<category><![CDATA[C#7]]></category>
		<category><![CDATA[C#8]]></category>
		<category><![CDATA[C#9]]></category>
		<category><![CDATA[Case]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[Clean Code]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Comparison]]></category>
		<category><![CDATA[Compile]]></category>
		<category><![CDATA[Concise]]></category>
		<category><![CDATA[Condition]]></category>
		<category><![CDATA[Conditional]]></category>
		<category><![CDATA[Control]]></category>
		<category><![CDATA[Control Flow]]></category>
		<category><![CDATA[CSharp]]></category>
		<category><![CDATA[Declarative]]></category>
		<category><![CDATA[Declarative Style]]></category>
		<category><![CDATA[Default]]></category>
		<category><![CDATA[delegate]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[Developer Guide]]></category>
		<category><![CDATA[Docs]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[dotnet]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[Error Handling]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[Exception]]></category>
		<category><![CDATA[Execution]]></category>
		<category><![CDATA[Expression]]></category>
		<category><![CDATA[Expression Body]]></category>
		<category><![CDATA[Expression Tree]]></category>
		<category><![CDATA[False]]></category>
		<category><![CDATA[Feature]]></category>
		<category><![CDATA[Flow]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Function Pointer]]></category>
		<category><![CDATA[Functional]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[Grammar]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[History]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[Imperative]]></category>
		<category><![CDATA[Intuitive]]></category>
		<category><![CDATA[Lambda]]></category>
		<category><![CDATA[Language Evolution]]></category>
		<category><![CDATA[Language Feature]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Library]]></category>
		<category><![CDATA[Logical Pattern]]></category>
		<category><![CDATA[Maintainable]]></category>
		<category><![CDATA[Mapping]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Modern C#]]></category>
		<category><![CDATA[Modern Programming]]></category>
		<category><![CDATA[New Feature]]></category>
		<category><![CDATA[November]]></category>
		<category><![CDATA[Null]]></category>
		<category><![CDATA[Null Check]]></category>
		<category><![CDATA[Nullable]]></category>
		<category><![CDATA[Object]]></category>
		<category><![CDATA[Object-Oriented]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[Operator]]></category>
		<category><![CDATA[Pattern Matching]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Property]]></category>
		<category><![CDATA[Property Pattern]]></category>
		<category><![CDATA[Range]]></category>
		<category><![CDATA[Readable]]></category>
		<category><![CDATA[Refactor]]></category>
		<category><![CDATA[Refactoring]]></category>
		<category><![CDATA[Relational Pattern]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[Return Value]]></category>
		<category><![CDATA[Role]]></category>
		<category><![CDATA[Running]]></category>
		<category><![CDATA[Runtime]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[SDK]]></category>
		<category><![CDATA[September]]></category>
		<category><![CDATA[Simplify]]></category>
		<category><![CDATA[Snippet]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[State]]></category>
		<category><![CDATA[Statement]]></category>
		<category><![CDATA[Stopped]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[Switch Action]]></category>
		<category><![CDATA[Switch Branch]]></category>
		<category><![CDATA[Switch Case]]></category>
		<category><![CDATA[Switch Clean]]></category>
		<category><![CDATA[Switch Default]]></category>
		<category><![CDATA[Switch Delegate]]></category>
		<category><![CDATA[Switch Docs]]></category>
		<category><![CDATA[Switch Evolution]]></category>
		<category><![CDATA[Switch Example]]></category>
		<category><![CDATA[Switch Expression]]></category>
		<category><![CDATA[Switch Expression Action]]></category>
		<category><![CDATA[Switch Expression C#]]></category>
		<category><![CDATA[Switch Expression Clean]]></category>
		<category><![CDATA[Switch Expression Default]]></category>
		<category><![CDATA[Switch Expression Delegate]]></category>
		<category><![CDATA[Switch Expression Docs]]></category>
		<category><![CDATA[Switch Expression Education]]></category>
		<category><![CDATA[Switch Expression Evolution]]></category>
		<category><![CDATA[Switch Expression Example]]></category>
		<category><![CDATA[Switch Expression Guide]]></category>
		<category><![CDATA[Switch Expression History]]></category>
		<category><![CDATA[Switch Expression Lambda]]></category>
		<category><![CDATA[Switch Expression Learning]]></category>
		<category><![CDATA[Switch Expression Logical]]></category>
		<category><![CDATA[Switch Expression Migration]]></category>
		<category><![CDATA[Switch Expression Modern]]></category>
		<category><![CDATA[Switch Expression Null]]></category>
		<category><![CDATA[Switch Expression Pattern]]></category>
		<category><![CDATA[Switch Expression Property]]></category>
		<category><![CDATA[Switch Expression Relational]]></category>
		<category><![CDATA[Switch Expression Sample]]></category>
		<category><![CDATA[Switch Expression Simplify]]></category>
		<category><![CDATA[Switch Expression Snippet]]></category>
		<category><![CDATA[Switch Expression Study]]></category>
		<category><![CDATA[Switch Expression Tuple]]></category>
		<category><![CDATA[Switch Expression Tutorial]]></category>
		<category><![CDATA[Switch Expression Upgrade]]></category>
		<category><![CDATA[Switch Expression Version]]></category>
		<category><![CDATA[Switch Expression Wildcard]]></category>
		<category><![CDATA[Switch Feature]]></category>
		<category><![CDATA[Switch Flow]]></category>
		<category><![CDATA[Switch Function]]></category>
		<category><![CDATA[Switch Guide]]></category>
		<category><![CDATA[Switch Keyword]]></category>
		<category><![CDATA[Switch Lambda]]></category>
		<category><![CDATA[Switch Logical]]></category>
		<category><![CDATA[Switch Mapping]]></category>
		<category><![CDATA[Switch Modern]]></category>
		<category><![CDATA[Switch Null]]></category>
		<category><![CDATA[Switch Operator]]></category>
		<category><![CDATA[Switch Pattern]]></category>
		<category><![CDATA[Switch Property]]></category>
		<category><![CDATA[Switch Relational]]></category>
		<category><![CDATA[Switch Simplify]]></category>
		<category><![CDATA[Switch Statement]]></category>
		<category><![CDATA[Switch Syntax]]></category>
		<category><![CDATA[Switch Tuple]]></category>
		<category><![CDATA[Switch Tutorial]]></category>
		<category><![CDATA[Switch Wildcard]]></category>
		<category><![CDATA[Syntax]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[True]]></category>
		<category><![CDATA[tuple]]></category>
		<category><![CDATA[Tuple Pattern]]></category>
		<category><![CDATA[TUTORIAL]]></category>
		<category><![CDATA[Upgrade]]></category>
		<category><![CDATA[User]]></category>
		<category><![CDATA[Value]]></category>
		<category><![CDATA[Variable]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[Visual studio]]></category>
		<category><![CDATA[VS Code]]></category>
		<category><![CDATA[Wildcard]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[기초]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40362</guid>

					<description><![CDATA[<p>C# Switch 식(Expression) C# 8.0(2019년 9월)부터 도입된 Switch 식(Switch Expression)은 기존의 switch-case 문을 획기적으로 줄여주는 강력한 기능 람다 표현식(=>)을 쓰는 것처럼 간결하고 직관적인 분기 처리가 가능 기존 방식 (Statement) 새로운 방식 (Expression) 강력한 활용 패턴 C# 9.0(2020년 11월)부터 Switch 식이 단순 매핑이 아니라 패턴 매칭(Pattern Matching)과 결합됨 범위 비교 (Relational Pattern) C# 9.0부터는 when 키워드 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/c/c-switch-%ec%8b%9dexpression/40362/">C# Switch 식(Expression)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-1bf84b0a      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#c-switch-식expression" class="uagb-toc-link__trigger">C# Switch 식(Expression)</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#기존-방식-statement" class="uagb-toc-link__trigger">기존 방식 (Statement)</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#새로운-방식-expression" class="uagb-toc-link__trigger">새로운 방식 (Expression)</a></li></ul></li><li class="uagb-toc__list"><a href="#강력한-활용-패턴" class="uagb-toc-link__trigger">강력한 활용 패턴</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#범위-비교-relational-pattern" class="uagb-toc-link__trigger">범위 비교 (Relational Pattern)</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#여러-변수-동시에-비교-tuple-pattern" class="uagb-toc-link__trigger">여러 변수 동시에 비교 (Tuple Pattern)</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#객체-속성-비교-property-pattern" class="uagb-toc-link__trigger">객체 속성 비교 (Property Pattern)</a></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#리턴값이-없는-메서드action-실행" class="uagb-toc-link__trigger">리턴값이 없는 메서드(Action) 실행</a></ul></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">C# Switch 식(Expression)</h2>



<p>C# 8.0(2019년 9월)부터 도입된 <strong>Switch 식(Switch Expression)</strong>은 기존의 <code><strong>switch-case</strong></code> 문을 획기적으로 줄여주는 강력한 기능</p>



<p>람다 표현식(<code>=></code>)을 쓰는 것처럼 간결하고 직관적인 분기 처리가 가능</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">기존 방식 (Statement)</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">public string GetGrade(int score)
{
    string grade;
    switch (score)
    {
        case 90:
            grade = "A";
            break;
        case 80:
            grade = "B";
            break;
        default:
            grade = "C";
            break;
    }
    return grade;
}</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">새로운 방식 (Expression)</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">public string GetGrade(int score) => score switch
{
    90 => "A",
    80 => "B",
    _  => "C"
};


또는 다른 범위 방식으로 (결과는 다름) 
score switch
{
    >= 90 => "A",
    >= 80 => "B",
    >= 70 => "C",
    _     => "D"
};
</pre>



<ul class="wp-block-list">
<li><strong>위치 이동:</strong> <code>switch</code> 키워드가 변수 <strong>뒤</strong>로 이동 (<code>score switch</code>)</li>



<li><strong>화살표 사용:</strong> <code>case ... :</code> 대신 람다 화살표 <code>=></code>를 사용</li>



<li><strong>Default 처리:</strong> <code>default:</code> 대신 와일드카드 <code>_</code>를 사용</li>



<li><strong>식(Expression):</strong> 그 자체가 &#8216;값&#8217;을 반환하므로 메서드의 리턴값으로 바로 사용할 수 있음</li>
</ul>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">강력한 활용 패턴</h2>



<p>C# 9.0(2020년 11월)부터 Switch 식이 단순 매핑이 아니라 <strong>패턴 매칭(Pattern Matching)</strong>과 결합됨</p>



<ul class="wp-block-list">
<li><strong>Switch Expression 자체는 C# 8에서 처음 도입</strong></li>



<li><strong>Pattern Matching 자체는 C# 7부터 지원</strong></li>



<li><strong>Relational Pattern, Logical Pattern 등이 C# 9에서 추가</strong></li>
</ul>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">범위 비교 (Relational Pattern)</h3>



<p>C# 9.0부터는 <code>when</code> 키워드 없이도 관계 연산자를 직접 사용</p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">int temperature = 28;

string weather = temperature switch
{
    >= 30 => "폭염",
    >= 20 => "쾌적함",
    >= 10 => "쌀쌀함",
    _     => "추움"
};</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">여러 변수 동시에 비교 (Tuple Pattern)</h3>



<p>두 개 이상의 상태를 조합해서 분기해야 할 때, <code>if-else</code> 중첩 없이 튜플 패턴으로 깔끔하게 해결</p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">string state = "Running";
bool hasError = true;

// (상태, 에러여부)를 한 번에 검사
string message = (state, hasError) switch
{
    ("Running", false) => "정상 작동 중",
    ("Running", true)  => "작동 중이나 오류 발생",
    ("Stopped", _)     => "시스템 중지됨", // _는 true/false 상관없음
    _                  => "알 수 없는 상태"
};</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">객체 속성 비교 (Property Pattern)</h3>



<p>객체 내부의 특정 프로퍼티 값에 따라 분기할 수도 있음 </p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">var user = new User { Role = "Admin", IsDeleted = false };

string accessLevel = user switch
{
    { Role: "Admin", IsDeleted: false } => "관리자 권한",
    { Role: "User", IsDeleted: false }  => "일반 사용자",
    { IsDeleted: true }                 => "삭제된 계정",
    _                                   => "접근 불가" // null 포함
};

// 객체가 null인 경우도 자동으로 _</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">리턴값이 없는 메서드(Action) 실행</h2>



<p><code>Action</code> 델리게이트를 반환받아 즉시 실행</p>



<p>switch expression은 &#8220;값&#8221;을 반환하므로 델리게이트(함수 포인터)를 반환하는 것도 가능</p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">int command = 1;

// 1. 각 조건에 맞는 Action(행동)을 선택하고
// 2. 마지막의 ()로 즉시 실행합니다.
(command switch
{
    1 => (Action)(() => SaveData()),
    2 => () => LoadData(),
    _ => () => Console.WriteLine("대기")
})(); 
// 마지막 ()는 "반환된 델리게이트 실행"</pre>



<p></p>
<p>The post <a href="https://lycos7560.com/c/c-switch-%ec%8b%9dexpression/40362/">C# Switch 식(Expression)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/c/c-switch-%ec%8b%9dexpression/40362/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MySQL 서비스 관리 명령어 (Ubuntu)</title>
		<link>https://lycos7560.com/ubuntu/mysql-%ec%84%9c%eb%b9%84%ec%8a%a4-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40254/</link>
					<comments>https://lycos7560.com/ubuntu/mysql-%ec%84%9c%eb%b9%84%ec%8a%a4-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40254/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Wed, 13 Aug 2025 11:50:10 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[기타]]></category>
		<category><![CDATA[3306]]></category>
		<category><![CDATA[ALTER USER]]></category>
		<category><![CDATA[ALTERUSER]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[configuration file]]></category>
		<category><![CDATA[CPU]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Data Backup]]></category>
		<category><![CDATA[data migration]]></category>
		<category><![CDATA[Data Recovery]]></category>
		<category><![CDATA[data security]]></category>
		<category><![CDATA[DataBase]]></category>
		<category><![CDATA[database administrator]]></category>
		<category><![CDATA[database list]]></category>
		<category><![CDATA[database management]]></category>
		<category><![CDATA[DB]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[Development Environment]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Disk]]></category>
		<category><![CDATA[error resolution]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[GRANT]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[iptables.]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[listening]]></category>
		<category><![CDATA[local access]]></category>
		<category><![CDATA[Manual]]></category>
		<category><![CDATA[Memory]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[my.cnf]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL account]]></category>
		<category><![CDATA[MySQL backup]]></category>
		<category><![CDATA[MySQL client]]></category>
		<category><![CDATA[MySQL configuration]]></category>
		<category><![CDATA[MySQL installation]]></category>
		<category><![CDATA[MySQL monitoring]]></category>
		<category><![CDATA[MySQL recovery]]></category>
		<category><![CDATA[MySQL setup]]></category>
		<category><![CDATA[MySQL status]]></category>
		<category><![CDATA[MySQL tips]]></category>
		<category><![CDATA[MySQL tutorial]]></category>
		<category><![CDATA[MySQL version]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[MySQL계정]]></category>
		<category><![CDATA[MySQL모니터링]]></category>
		<category><![CDATA[MySQL백업]]></category>
		<category><![CDATA[MySQL버전]]></category>
		<category><![CDATA[MySQL복구]]></category>
		<category><![CDATA[MySQL상태]]></category>
		<category><![CDATA[MySQL서비스]]></category>
		<category><![CDATA[MySQL설정]]></category>
		<category><![CDATA[MySQL설치]]></category>
		<category><![CDATA[MySQL클라이언트]]></category>
		<category><![CDATA[MySQL튜토리얼]]></category>
		<category><![CDATA[MySQL팁]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[Port Number]]></category>
		<category><![CDATA[privilege management]]></category>
		<category><![CDATA[privileges]]></category>
		<category><![CDATA[problem solving]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[PROCESSLIST]]></category>
		<category><![CDATA[Production Environment]]></category>
		<category><![CDATA[Query]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[Remote Access]]></category>
		<category><![CDATA[remote connection]]></category>
		<category><![CDATA[resource]]></category>
		<category><![CDATA[REVOKE]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[running queries]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[security settings]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[server administration]]></category>
		<category><![CDATA[server operation]]></category>
		<category><![CDATA[service management]]></category>
		<category><![CDATA[service restart]]></category>
		<category><![CDATA[service start]]></category>
		<category><![CDATA[service stop]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Shell스크립트]]></category>
		<category><![CDATA[SHOW STATUS]]></category>
		<category><![CDATA[SHOW VARIABLES]]></category>
		<category><![CDATA[SHOWSTATUS]]></category>
		<category><![CDATA[SHOWVARIABLES]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL query]]></category>
		<category><![CDATA[SQL쿼리]]></category>
		<category><![CDATA[status check]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[superuser]]></category>
		<category><![CDATA[system engineer]]></category>
		<category><![CDATA[system management]]></category>
		<category><![CDATA[systemctl]]></category>
		<category><![CDATA[TABLE STATUS]]></category>
		<category><![CDATA[TABLESTATUS]]></category>
		<category><![CDATA[tech info]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[tuning]]></category>
		<category><![CDATA[TUTORIAL]]></category>
		<category><![CDATA[ufw]]></category>
		<category><![CDATA[User]]></category>
		<category><![CDATA[user list]]></category>
		<category><![CDATA[User Management]]></category>
		<category><![CDATA[version check]]></category>
		<category><![CDATA[가이드]]></category>
		<category><![CDATA[개발]]></category>
		<category><![CDATA[개발자]]></category>
		<category><![CDATA[개발환경]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[관리]]></category>
		<category><![CDATA[권한]]></category>
		<category><![CDATA[권한관리]]></category>
		<category><![CDATA[기술정보]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[네트워크]]></category>
		<category><![CDATA[데브옵스]]></category>
		<category><![CDATA[데이터]]></category>
		<category><![CDATA[데이터마이그레이션]]></category>
		<category><![CDATA[데이터백업]]></category>
		<category><![CDATA[데이터베이스]]></category>
		<category><![CDATA[데이터베이스관리]]></category>
		<category><![CDATA[데이터베이스관리자]]></category>
		<category><![CDATA[데이터베이스목록]]></category>
		<category><![CDATA[데이터보안]]></category>
		<category><![CDATA[데이터복구]]></category>
		<category><![CDATA[디스크]]></category>
		<category><![CDATA[로그분석]]></category>
		<category><![CDATA[로컬접속]]></category>
		<category><![CDATA[리눅스]]></category>
		<category><![CDATA[리모트접속]]></category>
		<category><![CDATA[리소스]]></category>
		<category><![CDATA[리스닝]]></category>
		<category><![CDATA[마이SQL]]></category>
		<category><![CDATA[마이그레이션]]></category>
		<category><![CDATA[매뉴얼]]></category>
		<category><![CDATA[메모리]]></category>
		<category><![CDATA[명령어]]></category>
		<category><![CDATA[모니터링]]></category>
		<category><![CDATA[문제해결]]></category>
		<category><![CDATA[방화벽]]></category>
		<category><![CDATA[배치]]></category>
		<category><![CDATA[백업]]></category>
		<category><![CDATA[버전확인]]></category>
		<category><![CDATA[보안]]></category>
		<category><![CDATA[보안설정]]></category>
		<category><![CDATA[복구]]></category>
		<category><![CDATA[비밀번호]]></category>
		<category><![CDATA[사용자관리]]></category>
		<category><![CDATA[사용자목록]]></category>
		<category><![CDATA[상태확인]]></category>
		<category><![CDATA[서버]]></category>
		<category><![CDATA[서버관리]]></category>
		<category><![CDATA[서버구축]]></category>
		<category><![CDATA[서버마이그레이션]]></category>
		<category><![CDATA[서버운영]]></category>
		<category><![CDATA[서비스관리]]></category>
		<category><![CDATA[서비스시작]]></category>
		<category><![CDATA[서비스재시작]]></category>
		<category><![CDATA[서비스중지]]></category>
		<category><![CDATA[설정파일]]></category>
		<category><![CDATA[성능튜닝]]></category>
		<category><![CDATA[센토스]]></category>
		<category><![CDATA[쉘]]></category>
		<category><![CDATA[슈퍼유저]]></category>
		<category><![CDATA[스크립트]]></category>
		<category><![CDATA[스토리지]]></category>
		<category><![CDATA[시스템]]></category>
		<category><![CDATA[시스템관리]]></category>
		<category><![CDATA[시스템로그]]></category>
		<category><![CDATA[시스템엔지니어]]></category>
		<category><![CDATA[실행중인쿼리]]></category>
		<category><![CDATA[예약작업]]></category>
		<category><![CDATA[오류해결]]></category>
		<category><![CDATA[우분투]]></category>
		<category><![CDATA[운영]]></category>
		<category><![CDATA[운영환경]]></category>
		<category><![CDATA[원격접속]]></category>
		<category><![CDATA[유지보수]]></category>
		<category><![CDATA[일반사용자]]></category>
		<category><![CDATA[자동화]]></category>
		<category><![CDATA[정보]]></category>
		<category><![CDATA[커맨드라인]]></category>
		<category><![CDATA[쿼리]]></category>
		<category><![CDATA[터미널]]></category>
		<category><![CDATA[튜닝]]></category>
		<category><![CDATA[튜토리얼]]></category>
		<category><![CDATA[트러블슈팅]]></category>
		<category><![CDATA[패스워드]]></category>
		<category><![CDATA[포트]]></category>
		<category><![CDATA[포트번호]]></category>
		<category><![CDATA[프로덕션]]></category>
		<category><![CDATA[프로세스]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40254</guid>

					<description><![CDATA[<p>MySQL 서비스 관리 명령어 상태 확인 서비스 시작 서비스 재시작 서비스 중지 부팅 시 자동 시작 설정 파일 추가 유용한 명령어 백업 및 복구</p>
<p>The post <a href="https://lycos7560.com/ubuntu/mysql-%ec%84%9c%eb%b9%84%ec%8a%a4-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40254/">MySQL 서비스 관리 명령어 (Ubuntu)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-2c60eeae      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#mysql-서비스-관리-명령어" class="uagb-toc-link__trigger">MySQL 서비스 관리 명령어</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#상태-확인" class="uagb-toc-link__trigger">상태 확인</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#서비스-시작" class="uagb-toc-link__trigger">서비스 시작</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#서비스-재시작" class="uagb-toc-link__trigger">서비스 재시작</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#서비스-중지" class="uagb-toc-link__trigger">서비스 중지</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#부팅-시-자동-시작" class="uagb-toc-link__trigger">부팅 시 자동 시작</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#설정-파일" class="uagb-toc-link__trigger">설정 파일</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#추가-유용한-명령어" class="uagb-toc-link__trigger">추가 유용한 명령어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#백업-및-복구" class="uagb-toc-link__trigger">백업 및 복구</a></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">MySQL 서비스 관리 명령어</h2>



<h3 class="wp-block-heading">상태 확인</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo systemctl status mysql</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">서비스 시작</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo systemctl start mysql</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">서비스 재시작</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 설정 변경 후 MySQL 재시작 필요
sudo systemctl restart mysql</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">서비스 중지</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo systemctl stop mysql</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">부팅 시 자동 시작</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 부팅 시 자동 시작 활성화
sudo systemctl enable mysql

# 부팅 시 자동 시작 비활성화
sudo systemctl disable mysql</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">설정 파일</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo cat /etc/mysql/my.cnf

# 현재 상태 정보 확인
mysql -u root -p -e "SHOW STATUS;"

# MySQL 클라이언트로 현재 설정 값 확인
mysql -u root -p -e "SHOW VARIABLES;"

# 특정 설정 값만 필터링해서 보기 (예: buffer_pool_size)
mysql -u root -p -e "SHOW VARIABLES LIKE '%buffer_pool_size%';"</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">추가 유용한 명령어</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># MySQL 프로세스 확인
ps aux | grep mysql

# MySQL 버전 확인
mysql -V
mysql -u root -p -e "SELECT version();"

# 사용자 목록 확인
mysql -u root -p -e "SELECT user, host FROM mysql.user;"

# 데이터베이스 목록 확인
mysql -u root -p -e "SHOW DATABASES;"

# 테이블 상태 확인
mysql -u root -p -e "SHOW TABLE STATUS;"

# 실행 중인 쿼리 확인
mysql -u root -p -e "SHOW PROCESSLIST;"</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">백업 및 복구</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 전체 데이터베이스 백업
sudo mysqldump -u root -p --all-databases > full_backup.sql

# 특정 데이터베이스 백업
sudo mysqldump -u root -p database_name > db_backup.sql

# 백업 파일로 복구
mysql -u root -p &lt; full_backup.sql</pre>
<p>The post <a href="https://lycos7560.com/ubuntu/mysql-%ec%84%9c%eb%b9%84%ec%8a%a4-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40254/">MySQL 서비스 관리 명령어 (Ubuntu)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/mysql-%ec%84%9c%eb%b9%84%ec%8a%a4-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40254/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Docker 백그라운드 실행 명령어</title>
		<link>https://lycos7560.com/docker/docker-%eb%b0%b1%ea%b7%b8%eb%9d%bc%ec%9a%b4%eb%93%9c-%ec%8b%a4%ed%96%89-%eb%aa%85%eb%a0%b9%ec%96%b4/40219/</link>
					<comments>https://lycos7560.com/docker/docker-%eb%b0%b1%ea%b7%b8%eb%9d%bc%ec%9a%b4%eb%93%9c-%ec%8b%a4%ed%96%89-%eb%aa%85%eb%a0%b9%ec%96%b4/40219/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Thu, 31 Jul 2025 18:54:54 +0000</pubDate>
				<category><![CDATA[Docker]]></category>
		<category><![CDATA[Application]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[Auto Scaling]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Base Image]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[CI/CD]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Cloud Native]]></category>
		<category><![CDATA[Cloud Provider]]></category>
		<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Container]]></category>
		<category><![CDATA[Container as a Service]]></category>
		<category><![CDATA[Container Registry]]></category>
		<category><![CDATA[Container Runtime]]></category>
		<category><![CDATA[Containerization]]></category>
		<category><![CDATA[Continuous Deployment]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[docker]]></category>
		<category><![CDATA[Docker Compose]]></category>
		<category><![CDATA[Docker Desktop]]></category>
		<category><![CDATA[Docker Engine]]></category>
		<category><![CDATA[Docker Hub]]></category>
		<category><![CDATA[Dockerfile]]></category>
		<category><![CDATA[Enterprise]]></category>
		<category><![CDATA[Environment Variables]]></category>
		<category><![CDATA[GitOps]]></category>
		<category><![CDATA[Google Cloud]]></category>
		<category><![CDATA[Guest OS]]></category>
		<category><![CDATA[Health Check]]></category>
		<category><![CDATA[Host OS]]></category>
		<category><![CDATA[Hypervisor]]></category>
		<category><![CDATA[IaC]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Image Optimization]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Infrastructure as Code]]></category>
		<category><![CDATA[Isolation]]></category>
		<category><![CDATA[Kubernetes]]></category>
		<category><![CDATA[Layer]]></category>
		<category><![CDATA[Legacy System]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Load Balancing]]></category>
		<category><![CDATA[Logging]]></category>
		<category><![CDATA[Microservices]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Modernization]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Multi-stage Build]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Orchestration]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[pipeline]]></category>
		<category><![CDATA[Port Mapping]]></category>
		<category><![CDATA[Portability]]></category>
		<category><![CDATA[Production]]></category>
		<category><![CDATA[Pull]]></category>
		<category><![CDATA[Push]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[Resource Efficiency]]></category>
		<category><![CDATA[Run]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Security Scanning]]></category>
		<category><![CDATA[Service Mesh]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Staging]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[Swarm]]></category>
		<category><![CDATA[Tag]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<category><![CDATA[vm]]></category>
		<category><![CDATA[Volume]]></category>
		<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[가상머신]]></category>
		<category><![CDATA[개발]]></category>
		<category><![CDATA[게스트 OS]]></category>
		<category><![CDATA[격리]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[구글 클라우드]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[깃옵스]]></category>
		<category><![CDATA[네트워크]]></category>
		<category><![CDATA[데브옵스]]></category>
		<category><![CDATA[도커]]></category>
		<category><![CDATA[도커 데스크톱]]></category>
		<category><![CDATA[도커 엔진]]></category>
		<category><![CDATA[도커 컴포즈]]></category>
		<category><![CDATA[도커 허브]]></category>
		<category><![CDATA[도커파일]]></category>
		<category><![CDATA[레거시 시스템]]></category>
		<category><![CDATA[레이어]]></category>
		<category><![CDATA[레지스트리]]></category>
		<category><![CDATA[로깅]]></category>
		<category><![CDATA[로드 밸런싱]]></category>
		<category><![CDATA[리눅스]]></category>
		<category><![CDATA[리소스 효율성]]></category>
		<category><![CDATA[마이그레이션]]></category>
		<category><![CDATA[마이크로서비스]]></category>
		<category><![CDATA[멀티 스테이지 빌드]]></category>
		<category><![CDATA[모니터링]]></category>
		<category><![CDATA[모범 사례]]></category>
		<category><![CDATA[배포]]></category>
		<category><![CDATA[백업]]></category>
		<category><![CDATA[베이스 이미지]]></category>
		<category><![CDATA[보안]]></category>
		<category><![CDATA[보안 스캔]]></category>
		<category><![CDATA[볼륨]]></category>
		<category><![CDATA[빌드]]></category>
		<category><![CDATA[서비스 메시]]></category>
		<category><![CDATA[서비스형 컨테이너]]></category>
		<category><![CDATA[성능]]></category>
		<category><![CDATA[소프트웨어 개발]]></category>
		<category><![CDATA[스웜]]></category>
		<category><![CDATA[스테이징]]></category>
		<category><![CDATA[실행]]></category>
		<category><![CDATA[아마존 웹 서비스]]></category>
		<category><![CDATA[아이아씨]]></category>
		<category><![CDATA[아키텍처]]></category>
		<category><![CDATA[애저]]></category>
		<category><![CDATA[애플리케이션]]></category>
		<category><![CDATA[엔터프라이즈]]></category>
		<category><![CDATA[오케스트레이션]]></category>
		<category><![CDATA[오픈 소스]]></category>
		<category><![CDATA[윈도우]]></category>
		<category><![CDATA[이미지]]></category>
		<category><![CDATA[이미지 최적화]]></category>
		<category><![CDATA[이식성]]></category>
		<category><![CDATA[인프라스트럭처]]></category>
		<category><![CDATA[자동 확장]]></category>
		<category><![CDATA[자동화]]></category>
		<category><![CDATA[지속적 배포]]></category>
		<category><![CDATA[지속적 통합]]></category>
		<category><![CDATA[취약점]]></category>
		<category><![CDATA[컨테이너]]></category>
		<category><![CDATA[컨테이너 런타임]]></category>
		<category><![CDATA[컨테이너 레지스트리]]></category>
		<category><![CDATA[컨테이너화]]></category>
		<category><![CDATA[컴플라이언스]]></category>
		<category><![CDATA[코드형 인프라]]></category>
		<category><![CDATA[쿠버네티스]]></category>
		<category><![CDATA[클라우드 네이티브]]></category>
		<category><![CDATA[클라우드 제공자]]></category>
		<category><![CDATA[클라우드 컴퓨팅]]></category>
		<category><![CDATA[태그]]></category>
		<category><![CDATA[테스팅]]></category>
		<category><![CDATA[트러블슈팅]]></category>
		<category><![CDATA[파이프라인]]></category>
		<category><![CDATA[포트 매핑]]></category>
		<category><![CDATA[푸시]]></category>
		<category><![CDATA[풀]]></category>
		<category><![CDATA[프로덕션]]></category>
		<category><![CDATA[하이퍼바이저]]></category>
		<category><![CDATA[헬스 체크]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40219</guid>

					<description><![CDATA[<p>1. Docker 백그라운드 실행 명령어 컨테이너를 백그라운드(detached) 모드로 실행하여 터미널을 점유하지 않고 계속해서 동작하게 하는 명령어 2. 실행 중인 컨테이너 확인 명령어 현재 시스템에서 실행 중인 컨테이너를 확인하는 명령어 3. 모든 컨테이너 확인 명령어 (실행 중 + 정지) 실행 중인 컨테이너뿐만 아니라, 이전에 실행되었다가 현재는 정지된 모든 컨테이너를 확인하는 명령어 4. 기타 유용한 명령어</p>
<p>The post <a href="https://lycos7560.com/docker/docker-%eb%b0%b1%ea%b7%b8%eb%9d%bc%ec%9a%b4%eb%93%9c-%ec%8b%a4%ed%96%89-%eb%aa%85%eb%a0%b9%ec%96%b4/40219/">Docker 백그라운드 실행 명령어</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-a09493e2      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#1-docker-백그라운드-실행-명령어" class="uagb-toc-link__trigger">1. Docker 백그라운드 실행 명령어</a><li class="uagb-toc__list"><a href="#2-실행-중인-컨테이너-확인-명령어" class="uagb-toc-link__trigger">2. 실행 중인 컨테이너 확인 명령어</a><li class="uagb-toc__list"><a href="#3-모든-컨테이너-확인-명령어-실행-중-정지" class="uagb-toc-link__trigger">3. 모든 컨테이너 확인 명령어 (실행 중 + 정지)</a><li class="uagb-toc__list"><a href="#4-기타-유용한-명령어" class="uagb-toc-link__trigger">4. 기타 유용한 명령어</a></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">1. Docker 백그라운드 실행 명령어</h3>



<p>컨테이너를 백그라운드(detached) 모드로 실행하여 터미널을 점유하지 않고 계속해서 동작하게 하는 명령어</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// docker run -d [이미지 이름]
// -d 또는 --detach 옵션은 컨테이너를 백그라운드에서 실행하도록 지시
docker run -d -p 8080:80 nginx</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">2. 실행 중인 컨테이너 확인 명령어</h3>



<p>현재 시스템에서 실행 중인 컨테이너를 확인하는 명령어</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// ps는 "process status"의 약자로, 현재 실행 중인 컨테이너의 목록을 보여줌
docker ps


CONTAINER ID   IMAGE     COMMAND                  CREATED          STATUS          PORTS                                   NAMES
a1b2c3d4e5f6   nginx     "/docker-entrypoint.sh"  10 seconds ago   Up 8 seconds    0.0.0.0:8080->80/tcp, :::8080->80/tcp   web_server

// CONTAINER ID: 컨테이너의 고유 ID
// IMAGE: 컨테이너를 생성하는 데 사용된 이미지
// COMMAND: 컨테이너가 실행될 때 사용된 명령어
// CREATED: 컨테이너가 생성된 시점
// STATUS: 컨테이너의 현재 상태 (예: Up 5 minutes)
// PORTS: 포트 매핑 정보
// NAMES: 컨테이너에 할당된 이름</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">3. 모든 컨테이너 확인 명령어 (실행 중 + 정지)</h3>



<p>실행 중인 컨테이너뿐만 아니라, 이전에 실행되었다가 현재는 정지된 모든 컨테이너를 확인하는 명령어</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// -a 또는 --all 옵션은 모든 컨테이너를 표시하도록 지시
docker ps -a

CONTAINER ID   IMAGE     COMMAND                  CREATED         STATUS                      PORTS     NAMES
a1b2c3d4e5f6   nginx     "/docker-entrypoint.sh"  2 minutes ago   Up 2 minutes                ...       web_server
e6f5d4c3b2a1   ubuntu    "/bin/bash"              5 hours ago     Exited (0) 4 minutes ago              test_container</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">4. 기타 유용한 명령어</h3>



<ul class="wp-block-list">
<li>docker stop</li>



<li>docker start</li>



<li>docker kill</li>



<li>docker logs</li>



<li>docker attach</li>



<li>docker exec</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// 컨테이너 중지: docker stop [컨테이너 ID 또는 이름]
// 실행 중인 컨테이너를 정상적으로 종료시킵니다.
docker stop web_server

// 컨테이너 시작: docker start [컨테이너 ID 또는 이름]
// 정지된 컨테이너를 다시 시작합니다.
docker start test_container

// 컨테이너 강제 종료: docker kill [컨테이너 ID 또는 이름]
// 컨테이너를 강제로 즉시 종료시킵니다.
docker kill web_server

// 컨테이너 로그 확인: docker logs [컨테이너 ID 또는 이름]
// 컨테이너의 표준 출력(stdout)과 표준 에러(stderr) 로그를 확인합니다.
docker logs web_server

// 컨테이너 접속: docker attach [컨테이너 ID 또는 이름]
// 백그라운드에서 실행 중인 컨테이너의 터미널에 연결합니다.
docker attach web_server

// 컨테이너 내부에 명령어 실행: docker exec [컨테이너 ID 또는 이름] [명령어]
// 실행 중인 컨테이너 내부에 새로운 프로세스를 실행합니다.
// 예시 : Nginx 컨테이너에서 bash 셸을 실행하여 내부로 접속
docker exec -it web_server /bin/bash</pre>



<ul class="wp-block-list"></ul>



<p></p>
<p>The post <a href="https://lycos7560.com/docker/docker-%eb%b0%b1%ea%b7%b8%eb%9d%bc%ec%9a%b4%eb%93%9c-%ec%8b%a4%ed%96%89-%eb%aa%85%eb%a0%b9%ec%96%b4/40219/">Docker 백그라운드 실행 명령어</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/docker/docker-%eb%b0%b1%ea%b7%b8%eb%9d%bc%ec%9a%b4%eb%93%9c-%ec%8b%a4%ed%96%89-%eb%aa%85%eb%a0%b9%ec%96%b4/40219/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Docker Port Mapping(포트 매핑)</title>
		<link>https://lycos7560.com/docker/docker-port-mapping%ed%8f%ac%ed%8a%b8-%eb%a7%a4%ed%95%91/40217/</link>
					<comments>https://lycos7560.com/docker/docker-port-mapping%ed%8f%ac%ed%8a%b8-%eb%a7%a4%ed%95%91/40217/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Thu, 31 Jul 2025 18:29:11 +0000</pubDate>
				<category><![CDATA[Docker]]></category>
		<category><![CDATA[Application]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[Auto Scaling]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Base Image]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[CI/CD]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Cloud Native]]></category>
		<category><![CDATA[Cloud Provider]]></category>
		<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Container]]></category>
		<category><![CDATA[Container as a Service]]></category>
		<category><![CDATA[Container Registry]]></category>
		<category><![CDATA[Container Runtime]]></category>
		<category><![CDATA[Containerization]]></category>
		<category><![CDATA[Continuous Deployment]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[docker]]></category>
		<category><![CDATA[Docker Compose]]></category>
		<category><![CDATA[Docker Desktop]]></category>
		<category><![CDATA[Docker Engine]]></category>
		<category><![CDATA[Docker Hub]]></category>
		<category><![CDATA[Dockerfile]]></category>
		<category><![CDATA[Enterprise]]></category>
		<category><![CDATA[Environment Variables]]></category>
		<category><![CDATA[GitOps]]></category>
		<category><![CDATA[Google Cloud]]></category>
		<category><![CDATA[Guest OS]]></category>
		<category><![CDATA[Health Check]]></category>
		<category><![CDATA[Host OS]]></category>
		<category><![CDATA[Hypervisor]]></category>
		<category><![CDATA[IaC]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Image Optimization]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Infrastructure as Code]]></category>
		<category><![CDATA[Isolation]]></category>
		<category><![CDATA[Kubernetes]]></category>
		<category><![CDATA[Layer]]></category>
		<category><![CDATA[Legacy System]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Load Balancing]]></category>
		<category><![CDATA[Logging]]></category>
		<category><![CDATA[Microservices]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Modernization]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Multi-stage Build]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Orchestration]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[pipeline]]></category>
		<category><![CDATA[Port Mapping]]></category>
		<category><![CDATA[Portability]]></category>
		<category><![CDATA[Production]]></category>
		<category><![CDATA[Pull]]></category>
		<category><![CDATA[Push]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[Resource Efficiency]]></category>
		<category><![CDATA[Run]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Security Scanning]]></category>
		<category><![CDATA[Service Mesh]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Staging]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[Swarm]]></category>
		<category><![CDATA[Tag]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<category><![CDATA[vm]]></category>
		<category><![CDATA[Volume]]></category>
		<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[가상머신]]></category>
		<category><![CDATA[개발]]></category>
		<category><![CDATA[게스트 OS]]></category>
		<category><![CDATA[격리]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[구글 클라우드]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[깃옵스]]></category>
		<category><![CDATA[네트워크]]></category>
		<category><![CDATA[데브옵스]]></category>
		<category><![CDATA[도커]]></category>
		<category><![CDATA[도커 데스크톱]]></category>
		<category><![CDATA[도커 엔진]]></category>
		<category><![CDATA[도커 컴포즈]]></category>
		<category><![CDATA[도커 허브]]></category>
		<category><![CDATA[도커파일]]></category>
		<category><![CDATA[레거시 시스템]]></category>
		<category><![CDATA[레이어]]></category>
		<category><![CDATA[레지스트리]]></category>
		<category><![CDATA[로깅]]></category>
		<category><![CDATA[로드 밸런싱]]></category>
		<category><![CDATA[리눅스]]></category>
		<category><![CDATA[리소스 효율성]]></category>
		<category><![CDATA[마이그레이션]]></category>
		<category><![CDATA[마이크로서비스]]></category>
		<category><![CDATA[멀티 스테이지 빌드]]></category>
		<category><![CDATA[모니터링]]></category>
		<category><![CDATA[모범 사례]]></category>
		<category><![CDATA[배포]]></category>
		<category><![CDATA[백업]]></category>
		<category><![CDATA[베이스 이미지]]></category>
		<category><![CDATA[보안]]></category>
		<category><![CDATA[보안 스캔]]></category>
		<category><![CDATA[볼륨]]></category>
		<category><![CDATA[빌드]]></category>
		<category><![CDATA[서비스 메시]]></category>
		<category><![CDATA[서비스형 컨테이너]]></category>
		<category><![CDATA[성능]]></category>
		<category><![CDATA[소프트웨어 개발]]></category>
		<category><![CDATA[스웜]]></category>
		<category><![CDATA[스테이징]]></category>
		<category><![CDATA[실행]]></category>
		<category><![CDATA[아마존 웹 서비스]]></category>
		<category><![CDATA[아이아씨]]></category>
		<category><![CDATA[아키텍처]]></category>
		<category><![CDATA[애저]]></category>
		<category><![CDATA[애플리케이션]]></category>
		<category><![CDATA[엔터프라이즈]]></category>
		<category><![CDATA[오케스트레이션]]></category>
		<category><![CDATA[오픈 소스]]></category>
		<category><![CDATA[윈도우]]></category>
		<category><![CDATA[이미지]]></category>
		<category><![CDATA[이미지 최적화]]></category>
		<category><![CDATA[이식성]]></category>
		<category><![CDATA[인프라스트럭처]]></category>
		<category><![CDATA[자동 확장]]></category>
		<category><![CDATA[자동화]]></category>
		<category><![CDATA[지속적 배포]]></category>
		<category><![CDATA[지속적 통합]]></category>
		<category><![CDATA[취약점]]></category>
		<category><![CDATA[컨테이너]]></category>
		<category><![CDATA[컨테이너 런타임]]></category>
		<category><![CDATA[컨테이너 레지스트리]]></category>
		<category><![CDATA[컨테이너화]]></category>
		<category><![CDATA[컴플라이언스]]></category>
		<category><![CDATA[코드형 인프라]]></category>
		<category><![CDATA[쿠버네티스]]></category>
		<category><![CDATA[클라우드 네이티브]]></category>
		<category><![CDATA[클라우드 제공자]]></category>
		<category><![CDATA[클라우드 컴퓨팅]]></category>
		<category><![CDATA[태그]]></category>
		<category><![CDATA[테스팅]]></category>
		<category><![CDATA[트러블슈팅]]></category>
		<category><![CDATA[파이프라인]]></category>
		<category><![CDATA[포트 매핑]]></category>
		<category><![CDATA[푸시]]></category>
		<category><![CDATA[풀]]></category>
		<category><![CDATA[프로덕션]]></category>
		<category><![CDATA[하이퍼바이저]]></category>
		<category><![CDATA[헬스 체크]]></category>
		<category><![CDATA[현대화]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40217</guid>

					<description><![CDATA[<p>Docker 포트 매핑 (Port Mapping) Docker에서 포트 매핑은 컨테이너 내부에서 실행 중인 서비스의 포트와 호스트 컴퓨터(Docker가 설치된 머신)의 포트를 연결하는 중요한 기능입니다. 포트 매핑 왜 필요한가? Docker 컨테이너는 기본적으로 격리된 환경에서 실행됩니다. 즉, 컨테이너 내부에 웹 서버가 80번 포트에서 동작하더라도, 외부에서는 이 포트에 직접 접근할 수 없습니다. 컨테이너는 자체적인 IP 주소를 가지고 있으며, 호스트 컴퓨터와는 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/docker/docker-port-mapping%ed%8f%ac%ed%8a%b8-%eb%a7%a4%ed%95%91/40217/">Docker Port Mapping(포트 매핑)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-5dd74c8e      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#docker-포트-매핑-port-mapping" class="uagb-toc-link__trigger">Docker 포트 매핑 (Port Mapping)</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#포트-매핑-왜-필요한가" class="uagb-toc-link__trigger">포트 매핑 왜 필요한가?</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#포트-매핑의-역할" class="uagb-toc-link__trigger">포트 매핑의 역할</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#간단한-예시" class="uagb-toc-link__trigger">간단한 예시</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#요약" class="uagb-toc-link__trigger">요약</a></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Docker 포트 매핑 (Port Mapping)</h2>



<p>Docker에서 <strong>포트 매핑</strong>은 컨테이너 내부에서 실행 중인 서비스의 포트와 호스트 컴퓨터(Docker가 설치된 머신)의 포트를 연결하는 중요한 기능입니다.</p>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">포트 매핑 <strong>왜 필요한가?</strong></h3>



<p>Docker 컨테이너는 기본적으로 격리된 환경에서 실행됩니다. </p>



<p>즉, 컨테이너 내부에 웹 서버가 80번 포트에서 동작하더라도, 외부에서는 이 포트에 직접 접근할 수 없습니다. </p>



<p><strong>컨테이너</strong>는 <strong>자체적인 IP 주소</strong>를 가지고 있으며, 호스트 컴퓨터와는 다른 네트워크 환경에 있습니다.</p>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><strong>포트 매핑의 역할</strong></h3>



<p>포트 매핑은 <strong>컨테이너의 특정 포트</strong>를 <strong>호스트 컴퓨터의 특정 포트</strong>로 터널링(tunneling)하는 역할을 합니다. </p>



<p>이를 통해 외부 사용자는 호스트 컴퓨터의 포트를 통해 컨테이너 내부의 서비스에 접근할 수 있게 됩니다.</p>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">간단한 <strong>예시</strong></h3>



<p>Nginx 웹 서버를 실행하는 컨테이너를 생각해봅시다. </p>



<p>Nginx는 기본적으로 80번 포트에서 동작합니다. </p>



<p>이 컨테이너에<strong> 외부에서 접근</strong>할 수 있도록 하려면 다음과 같이 <strong>포트 매핑</strong>을 설정할 수 있습니다.</p>



<p>Bash</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">docker run -p 8080:80 nginx
</pre>



<ul class="wp-block-list">
<li><strong><code>-p</code></strong>: <br>포트 매핑 옵션</li>



<li><strong><code>8080</code></strong>: <br><strong>호스트 컴퓨터의 포트</strong>로 외부에서 <code>http://[호스트 IP]:8080</code>으로 접속</li>



<li><strong><code>80</code></strong>: <br><strong>컨테이너 내부의 포트</strong>로 Nginx가 이 포트에서 대기</li>



<li><strong><code>nginx</code></strong>: <br>사용할 Docker 이미지 이름</li>
</ul>



<p>호스트 컴퓨터의 8080번 포트로 들어오는 모든 네트워크 요청은 Docker에 의해 컨테이너의 80번 포트로 전달됩니다. </p>



<p>이로써 외부 사용자는 <code>http://localhost:8080</code> (만약 로컬에서 실행했다면)으로 접속하여 컨테이너 내부의 Nginx 웹 서버에 접근할 수 있게 됩니다.</p>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><strong>요약</strong></h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><td>개념</td><td>설명</td></tr><tr><td>컨테이너 포트</td><td>컨테이너 내부에서 서비스가 실제로 사용하고 있는 포트 (예: Nginx의 80번 포트)</td></tr><tr><td>호스트 포트</td><td>컨테이너에 접근하기 위해 외부에서 사용하는, 호스트 컴퓨터의 포트</td></tr><tr><td>포트 매핑</td><td>[호스트 포트]:[컨테이너 포트] 형태로 두 포트를 연결하는 과정</td></tr></tbody></table></figure>
<p>The post <a href="https://lycos7560.com/docker/docker-port-mapping%ed%8f%ac%ed%8a%b8-%eb%a7%a4%ed%95%91/40217/">Docker Port Mapping(포트 매핑)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/docker/docker-port-mapping%ed%8f%ac%ed%8a%b8-%eb%a7%a4%ed%95%91/40217/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Docker에서 HTML 페이지 배포</title>
		<link>https://lycos7560.com/docker/docker%ec%97%90%ec%84%9c-html-%ed%8e%98%ec%9d%b4%ec%a7%80-%eb%b0%b0%ed%8f%ac/40200/</link>
					<comments>https://lycos7560.com/docker/docker%ec%97%90%ec%84%9c-html-%ed%8e%98%ec%9d%b4%ec%a7%80-%eb%b0%b0%ed%8f%ac/40200/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Thu, 31 Jul 2025 17:13:30 +0000</pubDate>
				<category><![CDATA[Docker]]></category>
		<category><![CDATA[Application]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[Auto Scaling]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Base Image]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[CI/CD]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Cloud Native]]></category>
		<category><![CDATA[Cloud Provider]]></category>
		<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Container]]></category>
		<category><![CDATA[Container as a Service]]></category>
		<category><![CDATA[Container Registry]]></category>
		<category><![CDATA[Container Runtime]]></category>
		<category><![CDATA[Containerization]]></category>
		<category><![CDATA[Continuous Deployment]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[docker]]></category>
		<category><![CDATA[Docker Compose]]></category>
		<category><![CDATA[Docker Desktop]]></category>
		<category><![CDATA[Docker Engine]]></category>
		<category><![CDATA[Docker Hub]]></category>
		<category><![CDATA[Dockerfile]]></category>
		<category><![CDATA[Enterprise]]></category>
		<category><![CDATA[Environment Variables]]></category>
		<category><![CDATA[GitOps]]></category>
		<category><![CDATA[Google Cloud]]></category>
		<category><![CDATA[Guest OS]]></category>
		<category><![CDATA[Health Check]]></category>
		<category><![CDATA[Host OS]]></category>
		<category><![CDATA[Hypervisor]]></category>
		<category><![CDATA[IaC]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Image Optimization]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Infrastructure as Code]]></category>
		<category><![CDATA[Isolation]]></category>
		<category><![CDATA[Kubernetes]]></category>
		<category><![CDATA[Layer]]></category>
		<category><![CDATA[Legacy System]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Load Balancing]]></category>
		<category><![CDATA[Logging]]></category>
		<category><![CDATA[Microservices]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Modernization]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Multi-stage Build]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Orchestration]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[pipeline]]></category>
		<category><![CDATA[Port Mapping]]></category>
		<category><![CDATA[Portability]]></category>
		<category><![CDATA[Production]]></category>
		<category><![CDATA[Pull]]></category>
		<category><![CDATA[Push]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[Resource Efficiency]]></category>
		<category><![CDATA[Run]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Security Scanning]]></category>
		<category><![CDATA[Service Mesh]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Staging]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[Swarm]]></category>
		<category><![CDATA[Tag]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<category><![CDATA[vm]]></category>
		<category><![CDATA[Volume]]></category>
		<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[가상머신]]></category>
		<category><![CDATA[개발]]></category>
		<category><![CDATA[게스트 OS]]></category>
		<category><![CDATA[격리]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[구글 클라우드]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[깃옵스]]></category>
		<category><![CDATA[네트워크]]></category>
		<category><![CDATA[데브옵스]]></category>
		<category><![CDATA[도커]]></category>
		<category><![CDATA[도커 데스크톱]]></category>
		<category><![CDATA[도커 엔진]]></category>
		<category><![CDATA[도커 컴포즈]]></category>
		<category><![CDATA[도커 허브]]></category>
		<category><![CDATA[도커파일]]></category>
		<category><![CDATA[레거시 시스템]]></category>
		<category><![CDATA[레이어]]></category>
		<category><![CDATA[레지스트리]]></category>
		<category><![CDATA[로깅]]></category>
		<category><![CDATA[로드 밸런싱]]></category>
		<category><![CDATA[리눅스]]></category>
		<category><![CDATA[리소스 효율성]]></category>
		<category><![CDATA[마이그레이션]]></category>
		<category><![CDATA[마이크로서비스]]></category>
		<category><![CDATA[멀티 스테이지 빌드]]></category>
		<category><![CDATA[모니터링]]></category>
		<category><![CDATA[모범 사례]]></category>
		<category><![CDATA[배포]]></category>
		<category><![CDATA[백업]]></category>
		<category><![CDATA[베이스 이미지]]></category>
		<category><![CDATA[보안]]></category>
		<category><![CDATA[보안 스캔]]></category>
		<category><![CDATA[볼륨]]></category>
		<category><![CDATA[빌드]]></category>
		<category><![CDATA[서비스 메시]]></category>
		<category><![CDATA[서비스형 컨테이너]]></category>
		<category><![CDATA[성능]]></category>
		<category><![CDATA[소프트웨어 개발]]></category>
		<category><![CDATA[스웜]]></category>
		<category><![CDATA[스테이징]]></category>
		<category><![CDATA[실행]]></category>
		<category><![CDATA[아마존 웹 서비스]]></category>
		<category><![CDATA[아이아씨]]></category>
		<category><![CDATA[아키텍처]]></category>
		<category><![CDATA[애저]]></category>
		<category><![CDATA[애플리케이션]]></category>
		<category><![CDATA[엔터프라이즈]]></category>
		<category><![CDATA[오케스트레이션]]></category>
		<category><![CDATA[오픈 소스]]></category>
		<category><![CDATA[윈도우]]></category>
		<category><![CDATA[이미지]]></category>
		<category><![CDATA[이미지 최적화]]></category>
		<category><![CDATA[이식성]]></category>
		<category><![CDATA[인프라스트럭처]]></category>
		<category><![CDATA[자동 확장]]></category>
		<category><![CDATA[자동화]]></category>
		<category><![CDATA[지속적 배포]]></category>
		<category><![CDATA[지속적 통합]]></category>
		<category><![CDATA[취약점]]></category>
		<category><![CDATA[컨테이너]]></category>
		<category><![CDATA[컨테이너 런타임]]></category>
		<category><![CDATA[컨테이너 레지스트리]]></category>
		<category><![CDATA[컨테이너화]]></category>
		<category><![CDATA[컴플라이언스]]></category>
		<category><![CDATA[코드형 인프라]]></category>
		<category><![CDATA[쿠버네티스]]></category>
		<category><![CDATA[클라우드 네이티브]]></category>
		<category><![CDATA[클라우드 제공자]]></category>
		<category><![CDATA[클라우드 컴퓨팅]]></category>
		<category><![CDATA[태그]]></category>
		<category><![CDATA[테스팅]]></category>
		<category><![CDATA[트러블슈팅]]></category>
		<category><![CDATA[파이프라인]]></category>
		<category><![CDATA[포트 매핑]]></category>
		<category><![CDATA[푸시]]></category>
		<category><![CDATA[풀]]></category>
		<category><![CDATA[프로덕션]]></category>
		<category><![CDATA[하이퍼바이저]]></category>
		<category><![CDATA[헬스 체크]]></category>
		<category><![CDATA[현대화]]></category>
		<category><![CDATA[호스트 OS]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40200</guid>

					<description><![CDATA[<p>Docker에서 HTML 페이지 배포 기본적으로 웹 서버로 이동하여 HTML 페이지를 렌더링 웹 서버 nginx 이미지 가져오기 index.html 파일을 준비 nginx 이미지를 사용하여 Docker 컨테이너에 로드 Dockerfile 생성 도커파일은 확장자가 없음 Dockerfile 이미지 생성 도커파일은 확장자가 없음 컨테이너를 생성 및 실행</p>
<p>The post <a href="https://lycos7560.com/docker/docker%ec%97%90%ec%84%9c-html-%ed%8e%98%ec%9d%b4%ec%a7%80-%eb%b0%b0%ed%8f%ac/40200/">Docker에서 HTML 페이지 배포</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-df0e6530      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#docker에서-html-페이지-배포" class="uagb-toc-link__trigger">Docker에서 HTML 페이지 배포</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#웹-서버-nginx-이미지-가져오기" class="uagb-toc-link__trigger">웹 서버 nginx 이미지 가져오기</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#indexhtml-파일을-준비" class="uagb-toc-link__trigger">index.html 파일을 준비</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#nginx-이미지를-사용하여-docker-컨테이너에-로드" class="uagb-toc-link__trigger">nginx 이미지를 사용하여 Docker 컨테이너에 로드</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#dockerfile-생성" class="uagb-toc-link__trigger">Dockerfile 생성</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#dockerfile-이미지-생성" class="uagb-toc-link__trigger">Dockerfile 이미지 생성</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#컨테이너를-생성-및-실행" class="uagb-toc-link__trigger">컨테이너를 생성 및 실행</a></ul></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Docker에서 HTML 페이지 배포</h2>



<p>기본적으로 웹 서버로 이동하여 HTML 페이지를 렌더링</p>



<h3 class="wp-block-heading">웹 서버 nginx 이미지 가져오기</h3>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1874" height="867" src="https://lycos7560.com/wp-content/uploads/2025/08/image.png" alt="" class="wp-image-40201" srcset="https://lycos7560.com/wp-content/uploads/2025/08/image.png 1874w, https://lycos7560.com/wp-content/uploads/2025/08/image-300x139.png 300w, https://lycos7560.com/wp-content/uploads/2025/08/image-768x355.png 768w, https://lycos7560.com/wp-content/uploads/2025/08/image-1536x711.png 1536w" sizes="(max-width: 1874px) 100vw, 1874px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="664" height="250" src="https://lycos7560.com/wp-content/uploads/2025/08/image-1.png" alt="" class="wp-image-40202" srcset="https://lycos7560.com/wp-content/uploads/2025/08/image-1.png 664w, https://lycos7560.com/wp-content/uploads/2025/08/image-1-300x113.png 300w" sizes="(max-width: 664px) 100vw, 664px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">docker pull nginx</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1761" height="476" src="https://lycos7560.com/wp-content/uploads/2025/08/image-2.png" alt="" class="wp-image-40203" srcset="https://lycos7560.com/wp-content/uploads/2025/08/image-2.png 1761w, https://lycos7560.com/wp-content/uploads/2025/08/image-2-300x81.png 300w, https://lycos7560.com/wp-content/uploads/2025/08/image-2-768x208.png 768w, https://lycos7560.com/wp-content/uploads/2025/08/image-2-1536x415.png 1536w" sizes="(max-width: 1761px) 100vw, 1761px" /></figure>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">index.html 파일을 준비</h3>



<figure class="wp-block-image size-full"><img decoding="async" width="801" height="342" src="https://lycos7560.com/wp-content/uploads/2025/08/image-3.png" alt="" class="wp-image-40204" srcset="https://lycos7560.com/wp-content/uploads/2025/08/image-3.png 801w, https://lycos7560.com/wp-content/uploads/2025/08/image-3-300x128.png 300w, https://lycos7560.com/wp-content/uploads/2025/08/image-3-768x328.png 768w" sizes="(max-width: 801px) 100vw, 801px" /></figure>



<div style="height:15px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="html" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;!DOCTYPE html>
&lt;html lang="ko">
&lt;head>
  &lt;meta charset="UTF-8">
  &lt;title>테스트 페이지&lt;/title>
  &lt;style>
    body {
      font-family: Arial, sans-serif;
      background-color: #f0f0f0;
      text-align: center;
      padding: 50px;
    }
    h1 {
      color: #333;
    }
    button {
      padding: 10px 20px;
      font-size: 16px;
    }
  &lt;/style>
&lt;/head>
&lt;body>
  &lt;h1>HTML 테스트 페이지&lt;/h1>
  &lt;p>이 페이지는 테스트용으로 생성되었습니다.&lt;/p>
  &lt;button onclick="alert('버튼이 클릭되었습니다!')">클릭해보세요&lt;/button>
&lt;/body>
&lt;/html></pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">nginx 이미지를 사용하여 Docker 컨테이너에 로드</h3>



<h4 class="wp-block-heading">Dockerfile 생성</h4>



<p>도커파일은 확장자가 없음</p>



<figure class="wp-block-image size-full"><img decoding="async" width="631" height="251" src="https://lycos7560.com/wp-content/uploads/2025/08/image-5.png" alt="" class="wp-image-40208" srcset="https://lycos7560.com/wp-content/uploads/2025/08/image-5.png 631w, https://lycos7560.com/wp-content/uploads/2025/08/image-5-300x119.png 300w" sizes="(max-width: 631px) 100vw, 631px" /></figure>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">FROM nginx
COPY ./SampleWebApp/ /usr/share/nginx/html</pre>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1233" height="922" src="https://lycos7560.com/wp-content/uploads/2025/08/image-4.png" alt="" class="wp-image-40207" srcset="https://lycos7560.com/wp-content/uploads/2025/08/image-4.png 1233w, https://lycos7560.com/wp-content/uploads/2025/08/image-4-300x224.png 300w, https://lycos7560.com/wp-content/uploads/2025/08/image-4-768x574.png 768w" sizes="(max-width: 1233px) 100vw, 1233px" /></figure>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">Dockerfile 이미지 생성</h4>



<p>도커파일은 확장자가 없음</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">cd C:\Users\IKHO\Desktop\Docker 
// dockerfile 위치로 이동

ls 
// 파일 목록 확인

docker build -t sample_web_app:1.0.0 .
// docker build: 현재 디렉터리에 있는 Dockerfile을 기반으로 Docker 이미지를 만들라는 명령입니다.
// -t sample_web_app:1.0.0: 생성될 이미지의 이름과 태그를 지정합니다.
// sample_web_app이 이미지 이름
// 1.0.0은 버전 또는 태그 (나중에 버전별로 관리할 때 유용)
</pre>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1328" height="605" src="https://lycos7560.com/wp-content/uploads/2025/08/image-6.png" alt="" class="wp-image-40209" srcset="https://lycos7560.com/wp-content/uploads/2025/08/image-6.png 1328w, https://lycos7560.com/wp-content/uploads/2025/08/image-6-300x137.png 300w, https://lycos7560.com/wp-content/uploads/2025/08/image-6-768x350.png 768w" sizes="(max-width: 1328px) 100vw, 1328px" /></figure>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>



<div class="wp-block-uagb-container uagb-block-87046324 alignfull uagb-is-root-container"><div class="uagb-container-inner-blocks-wrap">
<div class="wp-block-uagb-container uagb-block-fa3865a3">
<figure class="wp-block-image size-full"><img decoding="async" width="1758" height="484" src="https://lycos7560.com/wp-content/uploads/2025/08/image-7.png" alt="" class="wp-image-40210" srcset="https://lycos7560.com/wp-content/uploads/2025/08/image-7.png 1758w, https://lycos7560.com/wp-content/uploads/2025/08/image-7-300x83.png 300w, https://lycos7560.com/wp-content/uploads/2025/08/image-7-768x211.png 768w, https://lycos7560.com/wp-content/uploads/2025/08/image-7-1536x423.png 1536w" sizes="(max-width: 1758px) 100vw, 1758px" /></figure>
</div>



<div class="wp-block-uagb-container uagb-block-91139572">
<figure class="wp-block-image size-full"><img decoding="async" width="539" height="119" src="https://lycos7560.com/wp-content/uploads/2025/08/image-8.png" alt="" class="wp-image-40211" srcset="https://lycos7560.com/wp-content/uploads/2025/08/image-8.png 539w, https://lycos7560.com/wp-content/uploads/2025/08/image-8-300x66.png 300w" sizes="(max-width: 539px) 100vw, 539px" /></figure>
</div>
</div></div>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">컨테이너를 생성 및 실행</h4>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">docker run --name sample_web_app-container -p 9000:80 sample_web_app:1.0.0
// docker run   : 새로운 컨테이너를 생성하고 실행합니다
// --name sample_web_app-container   : 컨테이너의 이름을 sample_web_app-container로 설정합니다
// -p 9000:80   : 포트 매핑: 호스트의 9000 포트를 컨테이너의 80 포트에 연결합니다 (외부에서 localhost:9000으로 접근 가능)
// sample_web_app:1.0.0   : sample_web_app라는 이름과 1.0.0 태그가 붙은 이미지를 기반으로 컨테이너를 생성합니다



http://127.0.0.1:9000/</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1333" height="641" src="https://lycos7560.com/wp-content/uploads/2025/08/image-9.png" alt="" class="wp-image-40213" srcset="https://lycos7560.com/wp-content/uploads/2025/08/image-9.png 1333w, https://lycos7560.com/wp-content/uploads/2025/08/image-9-300x144.png 300w, https://lycos7560.com/wp-content/uploads/2025/08/image-9-768x369.png 768w" sizes="(max-width: 1333px) 100vw, 1333px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="2230" height="933" src="https://lycos7560.com/wp-content/uploads/2025/08/image-11.png" alt="" class="wp-image-40215" srcset="https://lycos7560.com/wp-content/uploads/2025/08/image-11.png 2230w, https://lycos7560.com/wp-content/uploads/2025/08/image-11-300x126.png 300w, https://lycos7560.com/wp-content/uploads/2025/08/image-11-768x321.png 768w, https://lycos7560.com/wp-content/uploads/2025/08/image-11-1536x643.png 1536w, https://lycos7560.com/wp-content/uploads/2025/08/image-11-2048x857.png 2048w" sizes="(max-width: 2230px) 100vw, 2230px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1754" height="491" src="https://lycos7560.com/wp-content/uploads/2025/08/image-10.png" alt="" class="wp-image-40214" srcset="https://lycos7560.com/wp-content/uploads/2025/08/image-10.png 1754w, https://lycos7560.com/wp-content/uploads/2025/08/image-10-300x84.png 300w, https://lycos7560.com/wp-content/uploads/2025/08/image-10-768x215.png 768w, https://lycos7560.com/wp-content/uploads/2025/08/image-10-1536x430.png 1536w" sizes="(max-width: 1754px) 100vw, 1754px" /></figure>
<p>The post <a href="https://lycos7560.com/docker/docker%ec%97%90%ec%84%9c-html-%ed%8e%98%ec%9d%b4%ec%a7%80-%eb%b0%b0%ed%8f%ac/40200/">Docker에서 HTML 페이지 배포</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/docker/docker%ec%97%90%ec%84%9c-html-%ed%8e%98%ec%9d%b4%ec%a7%80-%eb%b0%b0%ed%8f%ac/40200/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>기본적인 Docker 명령어 연습</title>
		<link>https://lycos7560.com/docker/%ea%b8%b0%eb%b3%b8%ec%a0%81%ec%9d%b8-docker-%eb%aa%85%eb%a0%b9%ec%96%b4-%ec%97%b0%ec%8a%b5/40181/</link>
					<comments>https://lycos7560.com/docker/%ea%b8%b0%eb%b3%b8%ec%a0%81%ec%9d%b8-docker-%eb%aa%85%eb%a0%b9%ec%96%b4-%ec%97%b0%ec%8a%b5/40181/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Wed, 30 Jul 2025 14:02:17 +0000</pubDate>
				<category><![CDATA[Docker]]></category>
		<category><![CDATA[Application]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[Auto Scaling]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Base Image]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[CI/CD]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Cloud Native]]></category>
		<category><![CDATA[Cloud Provider]]></category>
		<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Container]]></category>
		<category><![CDATA[Container as a Service]]></category>
		<category><![CDATA[Container Registry]]></category>
		<category><![CDATA[Container Runtime]]></category>
		<category><![CDATA[Containerization]]></category>
		<category><![CDATA[Continuous Deployment]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[docker]]></category>
		<category><![CDATA[Docker Compose]]></category>
		<category><![CDATA[Docker Desktop]]></category>
		<category><![CDATA[Docker Engine]]></category>
		<category><![CDATA[Docker Hub]]></category>
		<category><![CDATA[Dockerfile]]></category>
		<category><![CDATA[Enterprise]]></category>
		<category><![CDATA[Environment Variables]]></category>
		<category><![CDATA[GitOps]]></category>
		<category><![CDATA[Google Cloud]]></category>
		<category><![CDATA[Guest OS]]></category>
		<category><![CDATA[Health Check]]></category>
		<category><![CDATA[Host OS]]></category>
		<category><![CDATA[Hypervisor]]></category>
		<category><![CDATA[IaC]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Image Optimization]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Infrastructure as Code]]></category>
		<category><![CDATA[Isolation]]></category>
		<category><![CDATA[Kubernetes]]></category>
		<category><![CDATA[Layer]]></category>
		<category><![CDATA[Legacy System]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Load Balancing]]></category>
		<category><![CDATA[Logging]]></category>
		<category><![CDATA[Microservices]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Modernization]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Multi-stage Build]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Orchestration]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[pipeline]]></category>
		<category><![CDATA[Port Mapping]]></category>
		<category><![CDATA[Portability]]></category>
		<category><![CDATA[Production]]></category>
		<category><![CDATA[Pull]]></category>
		<category><![CDATA[Push]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[Resource Efficiency]]></category>
		<category><![CDATA[Run]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Security Scanning]]></category>
		<category><![CDATA[Service Mesh]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Staging]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[Swarm]]></category>
		<category><![CDATA[Tag]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<category><![CDATA[vm]]></category>
		<category><![CDATA[Volume]]></category>
		<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[가상머신]]></category>
		<category><![CDATA[개발]]></category>
		<category><![CDATA[게스트 OS]]></category>
		<category><![CDATA[격리]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[구글 클라우드]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[깃옵스]]></category>
		<category><![CDATA[네트워크]]></category>
		<category><![CDATA[데브옵스]]></category>
		<category><![CDATA[도커]]></category>
		<category><![CDATA[도커 데스크톱]]></category>
		<category><![CDATA[도커 엔진]]></category>
		<category><![CDATA[도커 컴포즈]]></category>
		<category><![CDATA[도커 허브]]></category>
		<category><![CDATA[도커파일]]></category>
		<category><![CDATA[레거시 시스템]]></category>
		<category><![CDATA[레이어]]></category>
		<category><![CDATA[레지스트리]]></category>
		<category><![CDATA[로깅]]></category>
		<category><![CDATA[로드 밸런싱]]></category>
		<category><![CDATA[리눅스]]></category>
		<category><![CDATA[리소스 효율성]]></category>
		<category><![CDATA[마이그레이션]]></category>
		<category><![CDATA[마이크로서비스]]></category>
		<category><![CDATA[멀티 스테이지 빌드]]></category>
		<category><![CDATA[모니터링]]></category>
		<category><![CDATA[모범 사례]]></category>
		<category><![CDATA[배포]]></category>
		<category><![CDATA[백업]]></category>
		<category><![CDATA[베이스 이미지]]></category>
		<category><![CDATA[보안]]></category>
		<category><![CDATA[보안 스캔]]></category>
		<category><![CDATA[볼륨]]></category>
		<category><![CDATA[빌드]]></category>
		<category><![CDATA[서비스 메시]]></category>
		<category><![CDATA[서비스형 컨테이너]]></category>
		<category><![CDATA[성능]]></category>
		<category><![CDATA[소프트웨어 개발]]></category>
		<category><![CDATA[스웜]]></category>
		<category><![CDATA[스테이징]]></category>
		<category><![CDATA[실행]]></category>
		<category><![CDATA[아마존 웹 서비스]]></category>
		<category><![CDATA[아이아씨]]></category>
		<category><![CDATA[아키텍처]]></category>
		<category><![CDATA[애저]]></category>
		<category><![CDATA[애플리케이션]]></category>
		<category><![CDATA[엔터프라이즈]]></category>
		<category><![CDATA[오케스트레이션]]></category>
		<category><![CDATA[오픈 소스]]></category>
		<category><![CDATA[윈도우]]></category>
		<category><![CDATA[이미지]]></category>
		<category><![CDATA[이미지 최적화]]></category>
		<category><![CDATA[이식성]]></category>
		<category><![CDATA[인프라스트럭처]]></category>
		<category><![CDATA[자동 확장]]></category>
		<category><![CDATA[자동화]]></category>
		<category><![CDATA[지속적 배포]]></category>
		<category><![CDATA[지속적 통합]]></category>
		<category><![CDATA[취약점]]></category>
		<category><![CDATA[컨테이너]]></category>
		<category><![CDATA[컨테이너 런타임]]></category>
		<category><![CDATA[컨테이너 레지스트리]]></category>
		<category><![CDATA[컨테이너화]]></category>
		<category><![CDATA[컴플라이언스]]></category>
		<category><![CDATA[코드형 인프라]]></category>
		<category><![CDATA[쿠버네티스]]></category>
		<category><![CDATA[클라우드 네이티브]]></category>
		<category><![CDATA[클라우드 제공자]]></category>
		<category><![CDATA[클라우드 컴퓨팅]]></category>
		<category><![CDATA[태그]]></category>
		<category><![CDATA[테스팅]]></category>
		<category><![CDATA[트러블슈팅]]></category>
		<category><![CDATA[파이프라인]]></category>
		<category><![CDATA[포트 매핑]]></category>
		<category><![CDATA[푸시]]></category>
		<category><![CDATA[풀]]></category>
		<category><![CDATA[프로덕션]]></category>
		<category><![CDATA[하이퍼바이저]]></category>
		<category><![CDATA[헬스 체크]]></category>
		<category><![CDATA[현대화]]></category>
		<category><![CDATA[호스트 OS]]></category>
		<category><![CDATA[확장성]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40181</guid>

					<description><![CDATA[<p>기본적인 Docker 명령어 항목 의미 docker run 새로운 컨테이너를 생성하고 실행 -d Detached mode → 백그라운드에서 실행 ubuntu 사용할 이미지 이름 (없으면 자동으로 Docker Hub에서 pull함) sleep 10 컨테이너 내부에서 실행할 명령어 (10초 동안 대기) .NET Image 추가 두 항목의 IMAGE ID가 동일REPOSITORY: mcr.microsoft.com/dotnet/sdkTAG: 9.0 → IMAGE ID: 08fe223b9022TAG: latest → IMAGE ID: 08fe223b9022이유: latest [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/docker/%ea%b8%b0%eb%b3%b8%ec%a0%81%ec%9d%b8-docker-%eb%aa%85%eb%a0%b9%ec%96%b4-%ec%97%b0%ec%8a%b5/40181/">기본적인 Docker 명령어 연습</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-05d805a4      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#기본적인-docker-명령어" class="uagb-toc-link__trigger">기본적인 Docker 명령어</a><li class="uagb-toc__list"><a href="#net-image-추가" class="uagb-toc-link__trigger">.NET Image 추가</a></ol>					</div>
									</div>
				</div>
			


<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)"/>



<h2 class="wp-block-heading">기본적인 Docker 명령어</h2>



<div class="wp-block-uagb-container uagb-block-8ea15a0c alignfull uagb-is-root-container"><div class="uagb-container-inner-blocks-wrap">
<div class="wp-block-uagb-container uagb-block-78e1b8eb">
<figure class="wp-block-image size-full"><img decoding="async" width="694" height="521" src="https://lycos7560.com/wp-content/uploads/2025/07/image-24.png" alt="" class="wp-image-40182" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-24.png 694w, https://lycos7560.com/wp-content/uploads/2025/07/image-24-300x225.png 300w" sizes="(max-width: 694px) 100vw, 694px" /></figure>
</div>



<div class="wp-block-uagb-container uagb-block-b5e6ec6e">
<figure class="wp-block-image size-full"><img decoding="async" width="1876" height="938" src="https://lycos7560.com/wp-content/uploads/2025/07/image-25.png" alt="" class="wp-image-40183" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-25.png 1876w, https://lycos7560.com/wp-content/uploads/2025/07/image-25-300x150.png 300w, https://lycos7560.com/wp-content/uploads/2025/07/image-25-768x384.png 768w, https://lycos7560.com/wp-content/uploads/2025/07/image-25-1536x768.png 1536w" sizes="(max-width: 1876px) 100vw, 1876px" /></figure>
</div>
</div></div>



<div class="wp-block-uagb-container uagb-block-1d798c28 alignfull uagb-is-root-container"><div class="uagb-container-inner-blocks-wrap">
<div class="wp-block-uagb-container uagb-block-c832cc9d">
<figure class="wp-block-image size-full"><img decoding="async" width="969" height="505" src="https://lycos7560.com/wp-content/uploads/2025/07/image-26.png" alt="" class="wp-image-40184" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-26.png 969w, https://lycos7560.com/wp-content/uploads/2025/07/image-26-300x156.png 300w, https://lycos7560.com/wp-content/uploads/2025/07/image-26-768x400.png 768w" sizes="(max-width: 969px) 100vw, 969px" /><figcaption class="wp-element-caption">PowerShell 에서 Docker 버전 확인</figcaption></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">docker --version</pre>
</div>



<div class="wp-block-uagb-container uagb-block-7b55c5ea">
<figure class="wp-block-image size-full"><img decoding="async" width="549" height="472" src="https://lycos7560.com/wp-content/uploads/2025/07/image-27.png" alt="" class="wp-image-40186" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-27.png 549w, https://lycos7560.com/wp-content/uploads/2025/07/image-27-300x258.png 300w" sizes="(max-width: 549px) 100vw, 549px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// Docker Hub에서 hello-world 이미지를 다운로드하는 명령어
docker pull hello-world</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="901" height="241" src="https://lycos7560.com/wp-content/uploads/2025/07/image-28.png" alt="" class="wp-image-40187" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-28.png 901w, https://lycos7560.com/wp-content/uploads/2025/07/image-28-300x80.png 300w, https://lycos7560.com/wp-content/uploads/2025/07/image-28-768x205.png 768w" sizes="(max-width: 901px) 100vw, 901px" /><figcaption class="wp-element-caption">처음에는 docker를 잠시 멈추어 놓아서 실패</figcaption></figure>
</div>
</div></div>



<div class="wp-block-uagb-container uagb-block-498467b0 alignfull uagb-is-root-container"><div class="uagb-container-inner-blocks-wrap">
<div class="wp-block-uagb-container uagb-block-13b563ab">
<figure class="wp-block-image size-full"><img decoding="async" width="887" height="297" src="https://lycos7560.com/wp-content/uploads/2025/07/image-29.png" alt="" class="wp-image-40188" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-29.png 887w, https://lycos7560.com/wp-content/uploads/2025/07/image-29-300x100.png 300w, https://lycos7560.com/wp-content/uploads/2025/07/image-29-768x257.png 768w" sizes="(max-width: 887px) 100vw, 887px" /><figcaption class="wp-element-caption">다운로드 완료 후 이미지 확인</figcaption></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">docker images</pre>
</div>



<div class="wp-block-uagb-container uagb-block-10c0d61c">
<figure class="wp-block-image size-full"><img decoding="async" width="1380" height="490" src="https://lycos7560.com/wp-content/uploads/2025/07/image-30.png" alt="" class="wp-image-40189" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-30.png 1380w, https://lycos7560.com/wp-content/uploads/2025/07/image-30-300x107.png 300w, https://lycos7560.com/wp-content/uploads/2025/07/image-30-768x273.png 768w" sizes="(max-width: 1380px) 100vw, 1380px" /><figcaption class="wp-element-caption">Desktop에서도 확인이 가능하</figcaption></figure>
</div>
</div></div>



<div class="wp-block-uagb-container uagb-block-5f7b883f alignfull uagb-is-root-container"><div class="uagb-container-inner-blocks-wrap">
<div class="wp-block-uagb-container uagb-block-f890a406">
<figure class="wp-block-image size-full"><img decoding="async" width="668" height="440" src="https://lycos7560.com/wp-content/uploads/2025/07/image-31.png" alt="" class="wp-image-40190" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-31.png 668w, https://lycos7560.com/wp-content/uploads/2025/07/image-31-300x198.png 300w" sizes="(max-width: 668px) 100vw, 668px" /><figcaption class="wp-element-caption">hello-world 이미지 실행</figcaption></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">docker run hello-world</pre>
</div>



<div class="wp-block-uagb-container uagb-block-17c9d70c">
<figure class="wp-block-image size-full"><img decoding="async" width="1181" height="230" src="https://lycos7560.com/wp-content/uploads/2025/07/image-32.png" alt="" class="wp-image-40191" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-32.png 1181w, https://lycos7560.com/wp-content/uploads/2025/07/image-32-300x58.png 300w, https://lycos7560.com/wp-content/uploads/2025/07/image-32-768x150.png 768w" sizes="(max-width: 1181px) 100vw, 1181px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// 실행 중인 컨테이너 목록만 출력
docker ps

모든 컨테이너 목록 출력
// 중지된, 종료된, 에러 난 컨테이너도 포함해서 모두 보여줌
docker ps -a</pre>
</div>
</div></div>



<div class="wp-block-uagb-container uagb-block-e9226391 alignfull uagb-is-root-container"><div class="uagb-container-inner-blocks-wrap">
<div class="wp-block-uagb-container uagb-block-83c0597d">
<figure class="wp-block-image size-full"><img decoding="async" width="1105" height="477" src="https://lycos7560.com/wp-content/uploads/2025/07/image-33.png" alt="" class="wp-image-40192" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-33.png 1105w, https://lycos7560.com/wp-content/uploads/2025/07/image-33-300x130.png 300w, https://lycos7560.com/wp-content/uploads/2025/07/image-33-768x332.png 768w" sizes="(max-width: 1105px) 100vw, 1105px" /><figcaption class="wp-element-caption">이미지를 제거하려면 실행중인 container를 모두 제거해야한다.</figcaption></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">docker ps // 컨테이너 확인
docker ps -a // 모든 컨테이너 확인
docker rm 5fea
docker rm 6c465
docker rm 0fe
docker rm 1957
docker ps -a // 모든 컨테이너 확인
docker images // 이미지 검색
docker rmi ec1538 // 이미지 제거</pre>
</div>



<div class="wp-block-uagb-container uagb-block-0047b3d5">
<figure class="wp-block-image size-full"><img decoding="async" width="1309" height="525" src="https://lycos7560.com/wp-content/uploads/2025/07/image-34.png" alt="" class="wp-image-40193" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-34.png 1309w, https://lycos7560.com/wp-content/uploads/2025/07/image-34-300x120.png 300w, https://lycos7560.com/wp-content/uploads/2025/07/image-34-768x308.png 768w" sizes="(max-width: 1309px) 100vw, 1309px" /><figcaption class="wp-element-caption">이미지 제거 적용됨</figcaption></figure>
</div>
</div></div>



<div class="wp-block-uagb-container uagb-block-97073334 alignfull uagb-is-root-container"><div class="uagb-container-inner-blocks-wrap">
<div class="wp-block-uagb-container uagb-block-8a80809e">
<figure class="wp-block-image size-full"><img decoding="async" width="1590" height="702" src="https://lycos7560.com/wp-content/uploads/2025/07/image-35.png" alt="" class="wp-image-40194" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-35.png 1590w, https://lycos7560.com/wp-content/uploads/2025/07/image-35-300x132.png 300w, https://lycos7560.com/wp-content/uploads/2025/07/image-35-768x339.png 768w, https://lycos7560.com/wp-content/uploads/2025/07/image-35-1536x678.png 1536w" sizes="(max-width: 1590px) 100vw, 1590px" /></figure>
</div>



<div class="wp-block-uagb-container uagb-block-d6288adb">
<figure class="wp-block-image size-full"><img decoding="async" width="982" height="256" src="https://lycos7560.com/wp-content/uploads/2025/07/image-36.png" alt="" class="wp-image-40195" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-36.png 982w, https://lycos7560.com/wp-content/uploads/2025/07/image-36-300x78.png 300w, https://lycos7560.com/wp-content/uploads/2025/07/image-36-768x200.png 768w" sizes="(max-width: 982px) 100vw, 982px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">docker run -d ubuntu sleep 10</pre>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>항목</th><th>의미</th></tr></thead><tbody><tr><td><code>docker run</code></td><td>새로운 컨테이너를 생성하고 실행</td></tr><tr><td><code>-d</code></td><td><strong>Detached mode</strong> → 백그라운드에서 실행</td></tr><tr><td><code>ubuntu</code></td><td>사용할 이미지 이름 (없으면 자동으로 Docker Hub에서 pull함)</td></tr><tr><td><code>sleep 10</code></td><td>컨테이너 내부에서 실행할 명령어 (10초 동안 대기)</td></tr></tbody></table></figure>
</div>
</div></div>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)"/>



<h2 class="wp-block-heading">.NET Image 추가</h2>



<div class="wp-block-uagb-container uagb-block-cf968062 alignfull uagb-is-root-container"><div class="uagb-container-inner-blocks-wrap">
<div class="wp-block-uagb-container uagb-block-deb4736b">
<figure class="wp-block-image size-full"><img decoding="async" width="1824" height="1016" src="https://lycos7560.com/wp-content/uploads/2025/07/image-37.png" alt="" class="wp-image-40196" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-37.png 1824w, https://lycos7560.com/wp-content/uploads/2025/07/image-37-300x167.png 300w, https://lycos7560.com/wp-content/uploads/2025/07/image-37-768x428.png 768w, https://lycos7560.com/wp-content/uploads/2025/07/image-37-1536x856.png 1536w" sizes="(max-width: 1824px) 100vw, 1824px" /><figcaption class="wp-element-caption"><a href="https://hub.docker.com/r/microsoft/dotnet-sdk" target="_blank" rel="noreferrer noopener">https://hub.docker.com/r/microsoft/dotnet-sdk</a></figcaption></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">docker pull mcr.microsoft.com/dotnet/sdk:8.0
docker images</pre>
</div>



<div class="wp-block-uagb-container uagb-block-1095baf6">
<figure class="wp-block-image size-full"><img decoding="async" width="645" height="304" src="https://lycos7560.com/wp-content/uploads/2025/07/image-38.png" alt="" class="wp-image-40197" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-38.png 645w, https://lycos7560.com/wp-content/uploads/2025/07/image-38-300x141.png 300w" sizes="(max-width: 645px) 100vw, 645px" /></figure>



<figure class="wp-block-image size-full is-resized"><img decoding="async" width="763" height="165" src="https://lycos7560.com/wp-content/uploads/2025/07/image-39.png" alt="" class="wp-image-40198" style="width:763px;height:auto" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-39.png 763w, https://lycos7560.com/wp-content/uploads/2025/07/image-39-300x65.png 300w" sizes="(max-width: 763px) 100vw, 763px" /></figure>



<p>두 항목의 <strong><code>IMAGE ID</code>가 동일</strong><br>REPOSITORY: mcr.microsoft.com/dotnet/sdk<br>TAG: 9.0 → IMAGE ID: 08fe223b9022<br>TAG: latest → IMAGE ID: 08fe223b9022<br>이유: <code>latest</code> 태그는 <strong>별칭(alias)</strong> 이기 때문이다<br>도커에서 태그(<code>TAG</code>)는 특정 이미지 버전을 <strong>지칭하는 이름</strong>일 뿐이며, <strong>동일한 이미지에 여러 개의 태그를 붙일 수 있습니다.</strong><br>=> <code>9.0</code> 버전의 이미지에 <code>latest</code>라는 이름을 <strong>추가로 붙여 놓은 것</strong></p>
</div>
</div></div>



<p></p>
<p>The post <a href="https://lycos7560.com/docker/%ea%b8%b0%eb%b3%b8%ec%a0%81%ec%9d%b8-docker-%eb%aa%85%eb%a0%b9%ec%96%b4-%ec%97%b0%ec%8a%b5/40181/">기본적인 Docker 명령어 연습</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/docker/%ea%b8%b0%eb%b3%b8%ec%a0%81%ec%9d%b8-docker-%eb%aa%85%eb%a0%b9%ec%96%b4-%ec%97%b0%ec%8a%b5/40181/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Docker / Virtual Machine 차이점</title>
		<link>https://lycos7560.com/docker/docker-virtual-machine-%ec%b0%a8%ec%9d%b4%ec%a0%90/40173/</link>
					<comments>https://lycos7560.com/docker/docker-virtual-machine-%ec%b0%a8%ec%9d%b4%ec%a0%90/40173/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Wed, 30 Jul 2025 12:57:01 +0000</pubDate>
				<category><![CDATA[Docker]]></category>
		<category><![CDATA[Application]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[Auto Scaling]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Base Image]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[CI/CD]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Cloud Native]]></category>
		<category><![CDATA[Cloud Provider]]></category>
		<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Container]]></category>
		<category><![CDATA[Container as a Service]]></category>
		<category><![CDATA[Container Registry]]></category>
		<category><![CDATA[Container Runtime]]></category>
		<category><![CDATA[Containerization]]></category>
		<category><![CDATA[Continuous Deployment]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[docker]]></category>
		<category><![CDATA[Docker Compose]]></category>
		<category><![CDATA[Docker Desktop]]></category>
		<category><![CDATA[Docker Engine]]></category>
		<category><![CDATA[Docker Hub]]></category>
		<category><![CDATA[Dockerfile]]></category>
		<category><![CDATA[Enterprise]]></category>
		<category><![CDATA[Environment Variables]]></category>
		<category><![CDATA[GitOps]]></category>
		<category><![CDATA[Google Cloud]]></category>
		<category><![CDATA[Guest OS]]></category>
		<category><![CDATA[Health Check]]></category>
		<category><![CDATA[Host OS]]></category>
		<category><![CDATA[Hypervisor]]></category>
		<category><![CDATA[IaC]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Image Optimization]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Infrastructure as Code]]></category>
		<category><![CDATA[Isolation]]></category>
		<category><![CDATA[Kubernetes]]></category>
		<category><![CDATA[Layer]]></category>
		<category><![CDATA[Legacy System]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Load Balancing]]></category>
		<category><![CDATA[Logging]]></category>
		<category><![CDATA[Microservices]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Modernization]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Multi-stage Build]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Orchestration]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[pipeline]]></category>
		<category><![CDATA[Port Mapping]]></category>
		<category><![CDATA[Portability]]></category>
		<category><![CDATA[Production]]></category>
		<category><![CDATA[Pull]]></category>
		<category><![CDATA[Push]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[Resource Efficiency]]></category>
		<category><![CDATA[Run]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Security Scanning]]></category>
		<category><![CDATA[Service Mesh]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Staging]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[Swarm]]></category>
		<category><![CDATA[Tag]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<category><![CDATA[vm]]></category>
		<category><![CDATA[Volume]]></category>
		<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[가상머신]]></category>
		<category><![CDATA[개발]]></category>
		<category><![CDATA[게스트 OS]]></category>
		<category><![CDATA[격리]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[구글 클라우드]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[깃옵스]]></category>
		<category><![CDATA[네트워크]]></category>
		<category><![CDATA[데브옵스]]></category>
		<category><![CDATA[도커]]></category>
		<category><![CDATA[도커 데스크톱]]></category>
		<category><![CDATA[도커 엔진]]></category>
		<category><![CDATA[도커 컴포즈]]></category>
		<category><![CDATA[도커 허브]]></category>
		<category><![CDATA[도커파일]]></category>
		<category><![CDATA[레거시 시스템]]></category>
		<category><![CDATA[레이어]]></category>
		<category><![CDATA[레지스트리]]></category>
		<category><![CDATA[로깅]]></category>
		<category><![CDATA[로드 밸런싱]]></category>
		<category><![CDATA[리눅스]]></category>
		<category><![CDATA[리소스 효율성]]></category>
		<category><![CDATA[마이그레이션]]></category>
		<category><![CDATA[마이크로서비스]]></category>
		<category><![CDATA[멀티 스테이지 빌드]]></category>
		<category><![CDATA[모니터링]]></category>
		<category><![CDATA[모범 사례]]></category>
		<category><![CDATA[배포]]></category>
		<category><![CDATA[백업]]></category>
		<category><![CDATA[베이스 이미지]]></category>
		<category><![CDATA[보안]]></category>
		<category><![CDATA[보안 스캔]]></category>
		<category><![CDATA[볼륨]]></category>
		<category><![CDATA[빌드]]></category>
		<category><![CDATA[서비스 메시]]></category>
		<category><![CDATA[서비스형 컨테이너]]></category>
		<category><![CDATA[성능]]></category>
		<category><![CDATA[소프트웨어 개발]]></category>
		<category><![CDATA[스웜]]></category>
		<category><![CDATA[스테이징]]></category>
		<category><![CDATA[실행]]></category>
		<category><![CDATA[아마존 웹 서비스]]></category>
		<category><![CDATA[아이아씨]]></category>
		<category><![CDATA[아키텍처]]></category>
		<category><![CDATA[애저]]></category>
		<category><![CDATA[애플리케이션]]></category>
		<category><![CDATA[엔터프라이즈]]></category>
		<category><![CDATA[오케스트레이션]]></category>
		<category><![CDATA[오픈 소스]]></category>
		<category><![CDATA[윈도우]]></category>
		<category><![CDATA[이미지]]></category>
		<category><![CDATA[이미지 최적화]]></category>
		<category><![CDATA[이식성]]></category>
		<category><![CDATA[인프라스트럭처]]></category>
		<category><![CDATA[자동 확장]]></category>
		<category><![CDATA[자동화]]></category>
		<category><![CDATA[지속적 배포]]></category>
		<category><![CDATA[지속적 통합]]></category>
		<category><![CDATA[취약점]]></category>
		<category><![CDATA[컨테이너]]></category>
		<category><![CDATA[컨테이너 런타임]]></category>
		<category><![CDATA[컨테이너 레지스트리]]></category>
		<category><![CDATA[컨테이너화]]></category>
		<category><![CDATA[컴플라이언스]]></category>
		<category><![CDATA[코드형 인프라]]></category>
		<category><![CDATA[쿠버네티스]]></category>
		<category><![CDATA[클라우드 네이티브]]></category>
		<category><![CDATA[클라우드 제공자]]></category>
		<category><![CDATA[클라우드 컴퓨팅]]></category>
		<category><![CDATA[태그]]></category>
		<category><![CDATA[테스팅]]></category>
		<category><![CDATA[트러블슈팅]]></category>
		<category><![CDATA[파이프라인]]></category>
		<category><![CDATA[포트 매핑]]></category>
		<category><![CDATA[푸시]]></category>
		<category><![CDATA[풀]]></category>
		<category><![CDATA[프로덕션]]></category>
		<category><![CDATA[하이퍼바이저]]></category>
		<category><![CDATA[헬스 체크]]></category>
		<category><![CDATA[현대화]]></category>
		<category><![CDATA[호스트 OS]]></category>
		<category><![CDATA[확장성]]></category>
		<category><![CDATA[환경 변수]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40173</guid>

					<description><![CDATA[<p>현대 소프트웨어 개발에서 가상화 기술은 필수적인 요소입니다. 전통적인 가상머신(Virtual Machine)과 Docker 컨테이너 기술의 차이점을 알아봅니다. 1. 아키텍처 비교 1.1 Virtual Machine 아키텍처 Virtual Machine은 다음과 같은 계층 구조를 가집니다: 특징: 1.2 Docker 아키텍처 Docker는 다음과 같은 경량화된 구조를 가집니다: 특징: 2. 핵심 차이점 분석 2.1 운영체제 레이어 구분 Virtual Machine Docker Guest OS 필수 불필요 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/docker/docker-virtual-machine-%ec%b0%a8%ec%9d%b4%ec%a0%90/40173/">Docker / Virtual Machine 차이점</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-a0bc8ff7      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#1-아키텍처-비교" class="uagb-toc-link__trigger">1. 아키텍처 비교</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#11-virtual-machine-아키텍처" class="uagb-toc-link__trigger">1.1 Virtual Machine 아키텍처</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#12-docker-아키텍처" class="uagb-toc-link__trigger">1.2 Docker 아키텍처</a></li></ul></li><li class="uagb-toc__list"><a href="#2-핵심-차이점-분석" class="uagb-toc-link__trigger">2. 핵심 차이점 분석</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#21-운영체제-레이어" class="uagb-toc-link__trigger">2.1 운영체제 레이어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#22-리소스-사용량" class="uagb-toc-link__trigger">2.2 리소스 사용량</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#virtual-machine" class="uagb-toc-link__trigger">Virtual Machine</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#docker" class="uagb-toc-link__trigger">Docker</a></li></ul><li class="uagb-toc__list"><a href="#23-성능-비교" class="uagb-toc-link__trigger">2.3 성능 비교</a></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#3-장단점-비교" class="uagb-toc-link__trigger">3. 장단점 비교</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#31-virtual-machine" class="uagb-toc-link__trigger">3.1 Virtual Machine</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#장점" class="uagb-toc-link__trigger">장점</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#단점" class="uagb-toc-link__trigger">단점</a></li></ul><li class="uagb-toc__list"><a href="#32-docker" class="uagb-toc-link__trigger">3.2 Docker</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#장점" class="uagb-toc-link__trigger">장점</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#단점" class="uagb-toc-link__trigger">단점</a></li></ul></li></ul></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#4-사용-사례별-권장사항" class="uagb-toc-link__trigger">4. 사용 사례별 권장사항</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#41-virtual-machine이-적합한-경우" class="uagb-toc-link__trigger">4.1 Virtual Machine이 적합한 경우</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#42-docker가-적합한-경우" class="uagb-toc-link__trigger">4.2 Docker가 적합한 경우</a></li></ul></li></ul></li></ul></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#5-하이브리드-접근법" class="uagb-toc-link__trigger">5. 하이브리드 접근법</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#51-vm-위의-docker" class="uagb-toc-link__trigger">5.1 VM 위의 Docker</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#52-클라우드-환경" class="uagb-toc-link__trigger">5.2 클라우드 환경</a></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#6-결론" class="uagb-toc-link__trigger">6. 결론</a></ul></ul></ul></ul></ul></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<p>현대 소프트웨어 개발에서 가상화 기술은 필수적인 요소입니다.</p>



<p>전통적인 가상머신(Virtual Machine)과 Docker 컨테이너 기술의 차이점을 알아봅니다.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1668" height="710" src="https://lycos7560.com/wp-content/uploads/2025/07/image-20.png" alt="" class="wp-image-40174" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-20.png 1668w, https://lycos7560.com/wp-content/uploads/2025/07/image-20-300x128.png 300w, https://lycos7560.com/wp-content/uploads/2025/07/image-20-768x327.png 768w, https://lycos7560.com/wp-content/uploads/2025/07/image-20-1536x654.png 1536w" sizes="(max-width: 1668px) 100vw, 1668px" /></figure>



<ul class="wp-block-list">
<li><strong>Infrastructure</strong> (물리적 하드웨어) </li>



<li><strong>Host OS</strong> (호스트 운영체제) </li>



<li><strong>Hypervisor</strong> (가상화 관리자) </li>



<li><strong>Guest OS</strong> (각 가상머신마다 독립된 운영체제) </li>



<li><strong>bins/lib</strong> (각 VM마다 독립된 바이너리/라이브러리) </li>



<li><strong>App 1, 2, 3</strong> (애플리케이션들)</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">1. 아키텍처 비교</h2>



<h3 class="wp-block-heading">1.1 Virtual Machine 아키텍처</h3>



<p>Virtual Machine은 다음과 같은 계층 구조를 가집니다:</p>



<figure class="wp-block-image size-full"><img decoding="async" width="765" height="723" src="https://lycos7560.com/wp-content/uploads/2025/07/image-21.png" alt="" class="wp-image-40175" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-21.png 765w, https://lycos7560.com/wp-content/uploads/2025/07/image-21-300x284.png 300w" sizes="(max-width: 765px) 100vw, 765px" /></figure>



<p><strong>특징:</strong></p>



<ul class="wp-block-list">
<li>각 가상머신은 독립된 Guest OS를 보유</li>



<li>하드웨어 가상화를 통한 완전한 격리</li>



<li>Hypervisor가 하드웨어 리소스 관리</li>
</ul>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">1.2 Docker 아키텍처</h3>



<p>Docker는 다음과 같은 경량화된 구조를 가집니다:</p>



<figure class="wp-block-image size-full"><img decoding="async" width="746" height="692" src="https://lycos7560.com/wp-content/uploads/2025/07/image-22.png" alt="" class="wp-image-40176" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-22.png 746w, https://lycos7560.com/wp-content/uploads/2025/07/image-22-300x278.png 300w" sizes="(max-width: 746px) 100vw, 746px" /></figure>



<p><strong>특징:</strong></p>



<ul class="wp-block-list">
<li>Guest OS 레이어 제거</li>



<li>Host OS 커널 공유</li>



<li>컨테이너 단위의 프로세스 격리</li>
</ul>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">2. 핵심 차이점 분석</h2>



<h3 class="wp-block-heading">2.1 운영체제 레이어</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>구분</th><th>Virtual Machine</th><th>Docker</th></tr></thead><tbody><tr><td>Guest OS</td><td>필수</td><td>불필요</td></tr><tr><td>커널</td><td>각 VM마다 독립</td><td>Host OS 커널 공유</td></tr><tr><td>부팅 과정</td><td>OS 전체 부팅</td><td>프로세스 시작</td></tr></tbody></table></figure>



<h3 class="wp-block-heading">2.2 리소스 사용량</h3>



<h4 class="wp-block-heading">Virtual Machine</h4>



<ul class="wp-block-list">
<li><strong>메모리</strong>: GB 단위 (OS + 애플리케이션)</li>



<li><strong>디스크</strong>: 수 GB ~ 수십 GB</li>



<li><strong>CPU</strong>: OS 오버헤드 포함</li>



<li><strong>네트워크</strong>: 가상 네트워크 스택</li>
</ul>



<h4 class="wp-block-heading">Docker</h4>



<ul class="wp-block-list">
<li><strong>메모리</strong>: MB 단위 (애플리케이션만)</li>



<li><strong>디스크</strong>: MB ~ GB 단위</li>



<li><strong>CPU</strong>: 최소한의 오버헤드</li>



<li><strong>네트워크</strong>: Host 네트워크 스택 공유</li>
</ul>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">2.3 성능 비교</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>항목</th><th>Virtual Machine</th><th>Docker</th></tr></thead><tbody><tr><td>시작 시간</td><td>1-5분</td><td>1-10초</td></tr><tr><td>메모리 오버헤드</td><td>높음 (OS 포함)</td><td>낮음 (애플리케이션만)</td></tr><tr><td>I/O 성능</td><td>가상화 오버헤드</td><td>네이티브에 근접</td></tr><tr><td>밀도</td><td>낮음 (서버당 수십 개)</td><td>높음 (서버당 수백-수천 개)</td></tr></tbody></table></figure>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">3. 장단점 비교</h2>



<h3 class="wp-block-heading">3.1 Virtual Machine</h3>



<h4 class="wp-block-heading">장점</h4>



<ul class="wp-block-list">
<li><strong>완전한 격리</strong>: 하드웨어 레벨의 보안 격리</li>



<li><strong>OS 다양성</strong>: 다양한 운영체제 동시 실행 가능</li>



<li><strong>성숙한 기술</strong>: 오랜 기간 검증된 안정성</li>



<li><strong>강력한 보안</strong>: 하이퍼바이저 레벨 보안</li>
</ul>



<h4 class="wp-block-heading">단점</h4>



<ul class="wp-block-list">
<li><strong>높은 리소스 사용량</strong>: OS 오버헤드</li>



<li><strong>느린 시작</strong>: 부팅 시간 필요</li>



<li><strong>관리 복잡성</strong>: 각 VM의 OS 관리 필요</li>



<li><strong>낮은 밀도</strong>: 제한적인 VM 수</li>
</ul>



<h3 class="wp-block-heading">3.2 Docker</h3>



<h4 class="wp-block-heading">장점</h4>



<ul class="wp-block-list">
<li><strong>경량성</strong>: 최소한의 리소스 사용</li>



<li><strong>빠른 시작</strong>: 초 단위 컨테이너 시작</li>



<li><strong>높은 밀도</strong>: 단일 호스트에 많은 컨테이너</li>



<li><strong>일관성</strong>: &#8220;한 번 빌드, 어디서든 실행&#8221;</li>



<li><strong>DevOps 친화적</strong>: CI/CD 파이프라인 최적화</li>
</ul>



<h4 class="wp-block-heading">단점</h4>



<ul class="wp-block-list">
<li><strong>보안 취약점</strong>: 커널 공유로 인한 잠재적 위험</li>



<li><strong>OS 제약</strong>: Linux 컨테이너는 Linux에서만</li>



<li><strong>복잡한 네트워킹</strong>: 컨테이너 간 통신 설정</li>



<li><strong>데이터 지속성</strong>: 컨테이너 재시작 시 데이터 손실 위험</li>
</ul>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">4. 사용 사례별 권장사항</h2>



<h3 class="wp-block-heading">4.1 Virtual Machine이 적합한 경우</h3>



<p><strong>기업 환경</strong></p>



<ul class="wp-block-list">
<li>레거시 애플리케이션 운영</li>



<li>서로 다른 OS가 필요한 환경</li>



<li>강력한 보안 격리가 필요한 경우</li>



<li>규제 준수가 중요한 산업</li>
</ul>



<p><strong>기술적 요구사항</strong></p>



<ul class="wp-block-list">
<li>Windows와 Linux 애플리케이션 동시 운영</li>



<li>커널 수준의 소프트웨어 개발</li>



<li>완전한 네트워크 격리 필요</li>



<li>다양한 OS 버전 테스트</li>
</ul>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">4.2 Docker가 적합한 경우</h3>



<p><strong>현대적 애플리케이션 개발</strong></p>



<ul class="wp-block-list">
<li>마이크로서비스 아키텍처</li>



<li>클라우드 네이티브 애플리케이션</li>



<li>지속적 통합/배포 (CI/CD)</li>



<li>개발 환경 표준화</li>
</ul>



<p><strong>운영 효율성</strong></p>



<ul class="wp-block-list">
<li>빠른 스케일링이 필요한 서비스</li>



<li>리소스 효율성이 중요한 환경</li>



<li>개발팀 간 환경 일관성</li>



<li>컨테이너 오케스트레이션 (Kubernetes)</li>
</ul>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">5. 하이브리드 접근법</h2>



<p>많은 조직에서는 두 기술을 함께 사용합니다:</p>



<h3 class="wp-block-heading">5.1 VM 위의 Docker</h3>



<ul class="wp-block-list">
<li>VM으로 기본 격리 제공</li>



<li>VM 내에서 Docker로 애플리케이션 컨테이너화</li>



<li>보안과 효율성의 균형</li>
</ul>



<h3 class="wp-block-heading">5.2 클라우드 환경</h3>



<ul class="wp-block-list">
<li>AWS ECS, Google Cloud Run 등</li>



<li>관리형 컨테이너 서비스</li>



<li>인프라 추상화</li>
</ul>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">6. 결론</h2>



<p>Virtual Machine과 Docker는 각각 고유한 장점과 적용 영역을 가지고 있습니다.</p>



<p><strong>Virtual Machine</strong>은 강력한 격리와 다양한 OS 지원이 필요한 전통적인 엔터프라이즈 환경에 적합하며, </p>



<p><strong>Docker</strong>는 현대적인 클라우드 네이티브 애플리케이션 개발과 운영에 최적화되어 있습니다.</p>



<p>성공적인 시스템 설계를 위해서는 각 기술의 특성을 정확히 이해하고, 프로젝트의 요구사항에 맞는 적절한 선택을 하는 것이 중요합니다. </p>



<p>많은 경우 두 기술을 적절히 조합하여 사용하는 하이브리드 접근법이 최적의 결과를 제공할 수 있습니다.</p>
<p>The post <a href="https://lycos7560.com/docker/docker-virtual-machine-%ec%b0%a8%ec%9d%b4%ec%a0%90/40173/">Docker / Virtual Machine 차이점</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/docker/docker-virtual-machine-%ec%b0%a8%ec%9d%b4%ec%a0%90/40173/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Dependency Inversion Principle(DIP, 의존성 역전 원리)</title>
		<link>https://lycos7560.com/c/dependency-inversion-principledip-%ec%9d%98%ec%a1%b4%ec%84%b1-%ec%97%ad%ec%a0%84-%ec%9b%90%eb%a6%ac/38731/</link>
					<comments>https://lycos7560.com/c/dependency-inversion-principledip-%ec%9d%98%ec%a1%b4%ec%84%b1-%ec%97%ad%ec%a0%84-%ec%9b%90%eb%a6%ac/38731/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Sun, 03 Nov 2024 07:48:04 +0000</pubDate>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Blazor]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[.Net Core]]></category>
		<category><![CDATA[AddModelError]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[ASP.NET Core]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Consuming]]></category>
		<category><![CDATA[Controller]]></category>
		<category><![CDATA[Create]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Data access logic]]></category>
		<category><![CDATA[DataBase]]></category>
		<category><![CDATA[DbContext]]></category>
		<category><![CDATA[DbSet]]></category>
		<category><![CDATA[DELETE]]></category>
		<category><![CDATA[Dependency]]></category>
		<category><![CDATA[Dependency Inversion]]></category>
		<category><![CDATA[Deploying]]></category>
		<category><![CDATA[DI]]></category>
		<category><![CDATA[DIP]]></category>
		<category><![CDATA[Domain]]></category>
		<category><![CDATA[Domain Model]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[FileDescription]]></category>
		<category><![CDATA[Filestream]]></category>
		<category><![CDATA[GET]]></category>
		<category><![CDATA[IFormFile]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Image Controller]]></category>
		<category><![CDATA[IsValid]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Model]]></category>
		<category><![CDATA[ModelState]]></category>
		<category><![CDATA[pepe]]></category>
		<category><![CDATA[POST]]></category>
		<category><![CDATA[program]]></category>
		<category><![CDATA[Program.cs]]></category>
		<category><![CDATA[PUT]]></category>
		<category><![CDATA[Repository]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[REST Web API]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[Upload]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[web API]]></category>
		<category><![CDATA[wpf]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[배포]]></category>
		<category><![CDATA[의존성]]></category>
		<category><![CDATA[의존성 역전]]></category>
		<category><![CDATA[의존성 역전 원리]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=38731</guid>

					<description><![CDATA[<p>Dependency Inversion Principle(DIP, 의존성 역전 원리) https://learn.microsoft.com/en-us/dotnet/architecture/modern-web-apps-azure/architectural-principles#dependency-inversion The direction of dependency within the application should be in the direction of abstraction, not implementation details.애플리케이션 내의 종속성 방향은 구현 세부 사항이 아닌 추상화 방향이어야 합니다. Most applications are written such that compile-time dependency flows in the direction of runtime execution, producing a direct dependency graph.대부분의 애플리케이션은 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/c/dependency-inversion-principledip-%ec%9d%98%ec%a1%b4%ec%84%b1-%ec%97%ad%ec%a0%84-%ec%9b%90%eb%a6%ac/38731/">Dependency Inversion Principle(DIP, 의존성 역전 원리)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading" id="dependency-inversion">Dependency Inversion Principle(DIP, 의존성 역전 원리)</h2>



<p><a href="https://learn.microsoft.com/en-us/dotnet/architecture/modern-web-apps-azure/architectural-principles#dependency-inversion" target="_blank" rel="noreferrer noopener">https://learn.microsoft.com/en-us/dotnet/architecture/modern-web-apps-azure/architectural-principles#dependency-inversion</a></p>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p>The direction of dependency within the application should be in the direction of abstraction, not implementation details.<br>애플리케이션 내의 종속성 방향은 구현 세부 사항이 아닌 추상화 방향이어야 합니다. <br>Most applications are written such that compile-time dependency flows in the direction of runtime execution, producing a direct dependency graph.<br>대부분의 애플리케이션은 컴파일 타임 종속성이 런타임 실행 방향으로 흐르도록 작성되어 직접적인 종속성 그래프를 생성합니다.</p>



<p>That is, if class A calls a method of class B and class B calls a method of class C, then at compile time class A will depend on class B, and class B will depend on class C.<br>즉, class A가 class B의 메서드를 호출하고 class B가 class C의 메서드를 호출하는 경우 컴파일 타임에 class A는 class B에 종속되고 class B는 class C에 종속됩니다.</p>



<p>코드 구조에서 세부 구현 내용에 의존하지 말고, 더 추상적이고 일반적인 개념에 의존해야 한다는 뜻<br>이렇게 하면 코드가 더 유연해지고, 변경하기 쉽고, 재사용하기도 쉬워진다.<br>예를 들어, 어떤 기능을 <strong>직접 호출하는 것보다 그 기능을 일반적으로 설명하는 인터페이스를 사용하는 것이 더 좋다는 의미</strong>)</p>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="669" height="556" src="https://lycos7560.com/wp-content/uploads/2024/11/image-73.png" alt="" class="wp-image-38735" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-73.png 669w, https://lycos7560.com/wp-content/uploads/2024/11/image-73-300x249.png 300w" sizes="(max-width: 669px) 100vw, 669px" /><figcaption class="wp-element-caption">Direct dependency graph.</figcaption></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>Applying the dependency inversion principle allows A to call methods on an abstraction that B implements, making it possible for A to call B at run time, but for B to depend on an interface controlled by A at compile time (thus,&nbsp;<em>inverting</em>&nbsp;the typical compile-time dependency).<br>종속성 반전 원칙을 적용하면 A가 B가 구현하는 추상화에 대한 메서드를 호출할 수 있으므로 A가 런타임에 B를 호출할 수 있지만 B는 컴파일 타임에 A에 의해 제어되는 인터페이스에 의존할 수 있습니다<br>(따라서 일반적인 컴파일 타임 종속성을&nbsp;<em>반전시킵니다</em>).&nbsp;</p>



<p>At run time, the flow of program execution remains unchanged, but the introduction of interfaces means that different implementations of these interfaces can easily be plugged in.<br>런타임에 프로그램 실행의 흐름은 변경되지 않지만 인터페이스의 도입은 이러한 인터페이스의 다른 구현을 쉽게 연결할 수 있음을 의미합니다.</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="838" height="455" src="https://lycos7560.com/wp-content/uploads/2024/11/image-74.png" alt="" class="wp-image-38736" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-74.png 838w, https://lycos7560.com/wp-content/uploads/2024/11/image-74-300x163.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-74-768x417.png 768w" sizes="(max-width: 838px) 100vw, 838px" /><figcaption class="wp-element-caption">Inverted dependency graph.</figcaption></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p><strong>Dependency inversion</strong>&nbsp;is a key part of building loosely coupled applications, since implementation details can be written to depend on and implement higher-level abstractions, rather than the other way around.<br><strong>종속성 반전</strong>은 느슨하게 결합된 애플리케이션을 구축하는 데 있어 중요한 부분인데, 그 이유는 구현 세부 정보를 작성하여 더 높은 수준의 추상화에 의존하고 구현하도록 할 수 있기 때문입니다.</p>



<p>The resulting applications are more testable, modular, and maintainable as a result.<br>그 결과 응용 프로그램은 더 쉽게 테스트할 수 있고, 모듈화되며, 유지 관리가 더 용이합니다.&nbsp;</p>



<p>The practice of&nbsp;<em>dependency injection</em>&nbsp;is made possible by following the dependency inversion principle.<br><em>종속성 주입</em>의 연습은 종속성 반전 원칙을 따름으로써 가능합니다.</p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)"/>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p>애플리케이션의 의존성을 구체적인 구현이 아니라 추상화된 개념에 맞추는 것</p>



<p>대부분의 애플리케이션은 A 클래스가 B 클래스를, B 클래스가 C 클래스를 호출하는 형태로 작성됩니다. </p>



<p>이는 A가 B에, B가 C에 의존하게 만든다는 뜻입니다. 종속성 반전 원칙을 적용하면 A는 B의 구체적인 구현이 아니라 B가 구현하는 추상 개념에 의존하게 됩니다. </p>



<p>이렇게 하면 코드를 더 쉽게 테스트할 수 있고, 변경 및 유지보수가 용이해집니다. </p>



<p>간단히 말해, 코드를 유연하고 재사용 가능하게 만들어줍니다.</p>



<div style="height:102px" aria-hidden="true" class="wp-block-spacer"></div>



<p><strong>종속성 반전 적용 전</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// 엔진 클래스
public class Engine
{
    public void Start()
    {
        Console.WriteLine("Engine starts.");
    }
}

// 자동차 클래스
public class Car
{
    private Engine _engine = new Engine();

    public void Start()
    {
        _engine.Start();
        Console.WriteLine("Car starts.");
    }
}

// 메인 프로그램
public class Program
{
    public static void Main(string[] args)
    {
        Car car = new Car();
        car.Start();
    }
}
</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p><strong>종속성 반전 적용 후</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// 인터페이스 정의
public interface IEngine
{
    void Start();
}

// 엔진 클래스
public class Engine : IEngine
{
    public void Start()
    {
        Console.WriteLine("Engine starts.");
    }
}

// 전기 엔진 클래스
public class ElectricEngine : IEngine
{
    public void Start()
    {
        Console.WriteLine("Electric engine starts.");
    }
}

// 자동차 클래스
public class Car
{
    private IEngine _engine;

    public Car(IEngine engine)
    {
        _engine = engine;
    }

    public void Start()
    {
        _engine.Start();
        Console.WriteLine("Car starts.");
    }
}

// 메인 프로그램
public class Program
{
    public static void Main(string[] args)
    {
        IEngine engine = new Engine();
        Car car = new Car(engine);
        car.Start();
        
        IEngine electricEngine = new ElectricEngine();
        Car electricCar = new Car(electricEngine);
        electricCar.Start();
    }
}
</pre>



<p></p>
<p>The post <a href="https://lycos7560.com/c/dependency-inversion-principledip-%ec%9d%98%ec%a1%b4%ec%84%b1-%ec%97%ad%ec%a0%84-%ec%9b%90%eb%a6%ac/38731/">Dependency Inversion Principle(DIP, 의존성 역전 원리)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/c/dependency-inversion-principledip-%ec%9d%98%ec%a1%b4%ec%84%b1-%ec%97%ad%ec%a0%84-%ec%9b%90%eb%a6%ac/38731/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Deploying ASP.NET Web API To Azure</title>
		<link>https://lycos7560.com/c/deploying-asp-net-web-api-to-azure/38646/</link>
					<comments>https://lycos7560.com/c/deploying-asp-net-web-api-to-azure/38646/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Fri, 01 Nov 2024 08:08:45 +0000</pubDate>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[.Net Core]]></category>
		<category><![CDATA[AddModelError]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[ASP.NET Core]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Consuming]]></category>
		<category><![CDATA[Controller]]></category>
		<category><![CDATA[Create]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Data access logic]]></category>
		<category><![CDATA[DataBase]]></category>
		<category><![CDATA[DbContext]]></category>
		<category><![CDATA[DbSet]]></category>
		<category><![CDATA[DELETE]]></category>
		<category><![CDATA[Deploying]]></category>
		<category><![CDATA[Domain]]></category>
		<category><![CDATA[Domain Model]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[FileDescription]]></category>
		<category><![CDATA[Filestream]]></category>
		<category><![CDATA[GET]]></category>
		<category><![CDATA[IFormFile]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Image Controller]]></category>
		<category><![CDATA[IsValid]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Model]]></category>
		<category><![CDATA[ModelState]]></category>
		<category><![CDATA[pepe]]></category>
		<category><![CDATA[POST]]></category>
		<category><![CDATA[program]]></category>
		<category><![CDATA[Program.cs]]></category>
		<category><![CDATA[PUT]]></category>
		<category><![CDATA[Repository]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[REST Web API]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[Upload]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[web API]]></category>
		<category><![CDATA[wpf]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[배포]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=38646</guid>

					<description><![CDATA[<p>Deploying ASP.NET Web API To Azure https://azure.microsoft.com/ko-kr</p>
<p>The post <a href="https://lycos7560.com/c/deploying-asp-net-web-api-to-azure/38646/">Deploying ASP.NET Web API To Azure</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Deploying ASP.NET Web API To Azure</h2>



<p><a href="https://azure.microsoft.com/ko-kr" target="_blank" rel="noreferrer noopener">https://azure.microsoft.com/ko-kr</a></p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1462" height="565" src="https://lycos7560.com/wp-content/uploads/2024/11/image.png" alt="" class="wp-image-38647" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image.png 1462w, https://lycos7560.com/wp-content/uploads/2024/11/image-300x116.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-768x297.png 768w" sizes="(max-width: 1462px) 100vw, 1462px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1242" height="801" src="https://lycos7560.com/wp-content/uploads/2024/11/image-1.png" alt="" class="wp-image-38650" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-1.png 1242w, https://lycos7560.com/wp-content/uploads/2024/11/image-1-300x193.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-1-768x495.png 768w" sizes="(max-width: 1242px) 100vw, 1242px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1019" height="525" src="https://lycos7560.com/wp-content/uploads/2024/11/image-2.png" alt="" class="wp-image-38651" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-2.png 1019w, https://lycos7560.com/wp-content/uploads/2024/11/image-2-300x155.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-2-768x396.png 768w" sizes="(max-width: 1019px) 100vw, 1019px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="745" height="541" src="https://lycos7560.com/wp-content/uploads/2024/11/image-3.png" alt="" class="wp-image-38652" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-3.png 745w, https://lycos7560.com/wp-content/uploads/2024/11/image-3-300x218.png 300w" sizes="(max-width: 745px) 100vw, 745px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1242" height="801" src="https://lycos7560.com/wp-content/uploads/2024/11/image-4.png" alt="" class="wp-image-38653" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-4.png 1242w, https://lycos7560.com/wp-content/uploads/2024/11/image-4-300x193.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-4-768x495.png 768w" sizes="(max-width: 1242px) 100vw, 1242px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1242" height="801" src="https://lycos7560.com/wp-content/uploads/2024/11/image-10.png" alt="" class="wp-image-38659" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-10.png 1242w, https://lycos7560.com/wp-content/uploads/2024/11/image-10-300x193.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-10-768x495.png 768w" sizes="(max-width: 1242px) 100vw, 1242px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1456" height="399" src="https://lycos7560.com/wp-content/uploads/2024/11/image-11.png" alt="" class="wp-image-38661" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-11.png 1456w, https://lycos7560.com/wp-content/uploads/2024/11/image-11-300x82.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-11-768x210.png 768w" sizes="(max-width: 1456px) 100vw, 1456px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="936" height="769" src="https://lycos7560.com/wp-content/uploads/2024/11/image-12.png" alt="" class="wp-image-38662" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-12.png 936w, https://lycos7560.com/wp-content/uploads/2024/11/image-12-300x246.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-12-768x631.png 768w" sizes="(max-width: 936px) 100vw, 936px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1176" height="457" src="https://lycos7560.com/wp-content/uploads/2024/11/image-13.png" alt="" class="wp-image-38663" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-13.png 1176w, https://lycos7560.com/wp-content/uploads/2024/11/image-13-300x117.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-13-768x298.png 768w" sizes="(max-width: 1176px) 100vw, 1176px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1510" height="801" src="https://lycos7560.com/wp-content/uploads/2024/11/image-14.png" alt="" class="wp-image-38664" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-14.png 1510w, https://lycos7560.com/wp-content/uploads/2024/11/image-14-300x159.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-14-768x407.png 768w" sizes="(max-width: 1510px) 100vw, 1510px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image"><img decoding="async" width="1146" height="521" src="https://lycos7560.com/wp-content/uploads/2024/11/image-15.png" alt="" class="wp-image-38665" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-15.png 1146w, https://lycos7560.com/wp-content/uploads/2024/11/image-15-300x136.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-15-768x349.png 768w" sizes="(max-width: 1146px) 100vw, 1146px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="845" height="518" src="https://lycos7560.com/wp-content/uploads/2024/11/image-16.png" alt="" class="wp-image-38666" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-16.png 845w, https://lycos7560.com/wp-content/uploads/2024/11/image-16-300x184.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-16-768x471.png 768w" sizes="(max-width: 845px) 100vw, 845px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="662" height="978" src="https://lycos7560.com/wp-content/uploads/2024/11/image-17.png" alt="" class="wp-image-38668" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-17.png 662w, https://lycos7560.com/wp-content/uploads/2024/11/image-17-203x300.png 203w" sizes="(max-width: 662px) 100vw, 662px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="661" height="820" src="https://lycos7560.com/wp-content/uploads/2024/11/image-18.png" alt="" class="wp-image-38670" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-18.png 661w, https://lycos7560.com/wp-content/uploads/2024/11/image-18-242x300.png 242w" sizes="(max-width: 661px) 100vw, 661px" /></figure>
</div>
</div>



<figure class="wp-block-image size-full"><img decoding="async" width="1726" height="984" src="https://lycos7560.com/wp-content/uploads/2024/11/image-20.png" alt="" class="wp-image-38672" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-20.png 1726w, https://lycos7560.com/wp-content/uploads/2024/11/image-20-300x171.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-20-768x438.png 768w, https://lycos7560.com/wp-content/uploads/2024/11/image-20-1536x876.png 1536w" sizes="(max-width: 1726px) 100vw, 1726px" /></figure>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="895" height="295" src="https://lycos7560.com/wp-content/uploads/2024/11/image-21.png" alt="" class="wp-image-38673" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-21.png 895w, https://lycos7560.com/wp-content/uploads/2024/11/image-21-300x99.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-21-768x253.png 768w" sizes="(max-width: 895px) 100vw, 895px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="688" height="328" src="https://lycos7560.com/wp-content/uploads/2024/11/image-25.png" alt="" class="wp-image-38677" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-25.png 688w, https://lycos7560.com/wp-content/uploads/2024/11/image-25-300x143.png 300w" sizes="(max-width: 688px) 100vw, 688px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="645" height="987" src="https://lycos7560.com/wp-content/uploads/2024/11/image-27.png" alt="" class="wp-image-38679" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-27.png 645w, https://lycos7560.com/wp-content/uploads/2024/11/image-27-196x300.png 196w" sizes="(max-width: 645px) 100vw, 645px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="696" height="1020" src="https://lycos7560.com/wp-content/uploads/2024/11/image-26.png" alt="" class="wp-image-38678" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-26.png 696w, https://lycos7560.com/wp-content/uploads/2024/11/image-26-205x300.png 205w" sizes="(max-width: 696px) 100vw, 696px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="824" height="415" src="https://lycos7560.com/wp-content/uploads/2024/11/image-28.png" alt="" class="wp-image-38680" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-28.png 824w, https://lycos7560.com/wp-content/uploads/2024/11/image-28-300x151.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-28-768x387.png 768w" sizes="(max-width: 824px) 100vw, 824px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="826" height="330" src="https://lycos7560.com/wp-content/uploads/2024/11/image-29.png" alt="" class="wp-image-38681" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-29.png 826w, https://lycos7560.com/wp-content/uploads/2024/11/image-29-300x120.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-29-768x307.png 768w" sizes="(max-width: 826px) 100vw, 826px" /></figure>
</div>
</div>



<figure class="wp-block-image size-full"><img decoding="async" width="1404" height="1005" src="https://lycos7560.com/wp-content/uploads/2024/11/image-30.png" alt="" class="wp-image-38682" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-30.png 1404w, https://lycos7560.com/wp-content/uploads/2024/11/image-30-300x215.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-30-768x550.png 768w" sizes="(max-width: 1404px) 100vw, 1404px" /></figure>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.34%">
<figure class="wp-block-image size-full"><img decoding="async" width="714" height="604" src="https://lycos7560.com/wp-content/uploads/2024/11/image-31.png" alt="" class="wp-image-38683" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-31.png 714w, https://lycos7560.com/wp-content/uploads/2024/11/image-31-300x254.png 300w" sizes="(max-width: 714px) 100vw, 714px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.34%">
<figure class="wp-block-image size-full"><img decoding="async" width="618" height="372" src="https://lycos7560.com/wp-content/uploads/2024/11/image-32.png" alt="" class="wp-image-38684" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-32.png 618w, https://lycos7560.com/wp-content/uploads/2024/11/image-32-300x181.png 300w" sizes="(max-width: 618px) 100vw, 618px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%">
<figure class="wp-block-image size-full"><img decoding="async" width="473" height="496" src="https://lycos7560.com/wp-content/uploads/2024/11/image-33.png" alt="" class="wp-image-38685" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-33.png 473w, https://lycos7560.com/wp-content/uploads/2024/11/image-33-286x300.png 286w" sizes="(max-width: 473px) 100vw, 473px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.34%">
<figure class="wp-block-image size-full"><img decoding="async" width="762" height="475" src="https://lycos7560.com/wp-content/uploads/2024/11/image-34.png" alt="" class="wp-image-38686" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-34.png 762w, https://lycos7560.com/wp-content/uploads/2024/11/image-34-300x187.png 300w" sizes="(max-width: 762px) 100vw, 762px" /><figcaption class="wp-element-caption">Azure 계정확인</figcaption></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.34%">
<figure class="wp-block-image size-full"><img decoding="async" width="596" height="362" src="https://lycos7560.com/wp-content/uploads/2024/11/image-35.png" alt="" class="wp-image-38687" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-35.png 596w, https://lycos7560.com/wp-content/uploads/2024/11/image-35-300x182.png 300w" sizes="(max-width: 596px) 100vw, 596px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%">
<figure class="wp-block-image size-full"><img decoding="async" width="781" height="549" src="https://lycos7560.com/wp-content/uploads/2024/11/image-36.png" alt="" class="wp-image-38688" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-36.png 781w, https://lycos7560.com/wp-content/uploads/2024/11/image-36-300x211.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-36-768x540.png 768w" sizes="(max-width: 781px) 100vw, 781px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.34%">
<figure class="wp-block-image size-full"><img decoding="async" width="787" height="541" src="https://lycos7560.com/wp-content/uploads/2024/11/image-38.png" alt="" class="wp-image-38690" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-38.png 787w, https://lycos7560.com/wp-content/uploads/2024/11/image-38-300x206.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-38-768x528.png 768w" sizes="(max-width: 787px) 100vw, 787px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.34%">
<figure class="wp-block-image size-full"><img decoding="async" width="779" height="545" src="https://lycos7560.com/wp-content/uploads/2024/11/image-39.png" alt="" class="wp-image-38691" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-39.png 779w, https://lycos7560.com/wp-content/uploads/2024/11/image-39-300x210.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-39-768x537.png 768w" sizes="(max-width: 779px) 100vw, 779px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%">
<figure class="wp-block-image size-full"><img decoding="async" width="764" height="523" src="https://lycos7560.com/wp-content/uploads/2024/11/image-40.png" alt="" class="wp-image-38692" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-40.png 764w, https://lycos7560.com/wp-content/uploads/2024/11/image-40-300x205.png 300w" sizes="(max-width: 764px) 100vw, 764px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50.01%">
<figure class="wp-block-image size-full"><img decoding="async" width="785" height="547" src="https://lycos7560.com/wp-content/uploads/2024/11/image-41.png" alt="" class="wp-image-38693" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-41.png 785w, https://lycos7560.com/wp-content/uploads/2024/11/image-41-300x209.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-41-768x535.png 768w" sizes="(max-width: 785px) 100vw, 785px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:49.99%">
<figure class="wp-block-image size-full"><img decoding="async" width="1133" height="772" src="https://lycos7560.com/wp-content/uploads/2024/11/image-42.png" alt="" class="wp-image-38694" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-42.png 1133w, https://lycos7560.com/wp-content/uploads/2024/11/image-42-300x204.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-42-768x523.png 768w" sizes="(max-width: 1133px) 100vw, 1133px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1074" height="288" src="https://lycos7560.com/wp-content/uploads/2024/11/image-43.png" alt="" class="wp-image-38695" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-43.png 1074w, https://lycos7560.com/wp-content/uploads/2024/11/image-43-300x80.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-43-768x206.png 768w" sizes="(max-width: 1074px) 100vw, 1074px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="786" height="549" src="https://lycos7560.com/wp-content/uploads/2024/11/image-44.png" alt="" class="wp-image-38697" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-44.png 786w, https://lycos7560.com/wp-content/uploads/2024/11/image-44-300x210.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-44-768x536.png 768w" sizes="(max-width: 786px) 100vw, 786px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="777" height="540" src="https://lycos7560.com/wp-content/uploads/2024/11/image-45.png" alt="" class="wp-image-38698" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-45.png 777w, https://lycos7560.com/wp-content/uploads/2024/11/image-45-300x208.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-45-768x534.png 768w" sizes="(max-width: 777px) 100vw, 777px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="775" height="543" src="https://lycos7560.com/wp-content/uploads/2024/11/image-46.png" alt="" class="wp-image-38699" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-46.png 775w, https://lycos7560.com/wp-content/uploads/2024/11/image-46-300x210.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-46-768x538.png 768w" sizes="(max-width: 775px) 100vw, 775px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="788" height="564" src="https://lycos7560.com/wp-content/uploads/2024/11/image-47.png" alt="" class="wp-image-38700" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-47.png 788w, https://lycos7560.com/wp-content/uploads/2024/11/image-47-300x215.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-47-768x550.png 768w" sizes="(max-width: 788px) 100vw, 788px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1059" height="338" src="https://lycos7560.com/wp-content/uploads/2024/11/image-48.png" alt="" class="wp-image-38701" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-48.png 1059w, https://lycos7560.com/wp-content/uploads/2024/11/image-48-300x96.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-48-768x245.png 768w" sizes="(max-width: 1059px) 100vw, 1059px" /><figcaption class="wp-element-caption">위와 같은 작업 반복</figcaption></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="858" height="260" src="https://lycos7560.com/wp-content/uploads/2024/11/image-49.png" alt="" class="wp-image-38702" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-49.png 858w, https://lycos7560.com/wp-content/uploads/2024/11/image-49-300x91.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-49-768x233.png 768w" sizes="(max-width: 858px) 100vw, 858px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1117" height="772" src="https://lycos7560.com/wp-content/uploads/2024/11/image-54.png" alt="" class="wp-image-38708" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-54.png 1117w, https://lycos7560.com/wp-content/uploads/2024/11/image-54-300x207.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-54-768x531.png 768w" sizes="(max-width: 1117px) 100vw, 1117px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1151" height="377" src="https://lycos7560.com/wp-content/uploads/2024/11/image-53.png" alt="" class="wp-image-38711" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-53.png 1151w, https://lycos7560.com/wp-content/uploads/2024/11/image-53-300x98.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-53-768x252.png 768w" sizes="(max-width: 1151px) 100vw, 1151px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="686" height="544" src="https://lycos7560.com/wp-content/uploads/2024/11/image-55.png" alt="" class="wp-image-38712" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-55.png 686w, https://lycos7560.com/wp-content/uploads/2024/11/image-55-300x238.png 300w" sizes="(max-width: 686px) 100vw, 686px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1170" height="123" src="https://lycos7560.com/wp-content/uploads/2024/11/image-50.png" alt="" class="wp-image-38703" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-50.png 1170w, https://lycos7560.com/wp-content/uploads/2024/11/image-50-300x32.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-50-768x81.png 768w" sizes="(max-width: 1170px) 100vw, 1170px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1046" height="319" src="https://lycos7560.com/wp-content/uploads/2024/11/image-56.png" alt="" class="wp-image-38713" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-56.png 1046w, https://lycos7560.com/wp-content/uploads/2024/11/image-56-300x91.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-56-768x234.png 768w" sizes="(max-width: 1046px) 100vw, 1046px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.34%">
<figure class="wp-block-image size-full"><img decoding="async" width="687" height="537" src="https://lycos7560.com/wp-content/uploads/2024/11/image-57.png" alt="" class="wp-image-38714" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-57.png 687w, https://lycos7560.com/wp-content/uploads/2024/11/image-57-300x234.png 300w" sizes="(max-width: 687px) 100vw, 687px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%">
<figure class="wp-block-image size-full"><img decoding="async" width="319" height="342" src="https://lycos7560.com/wp-content/uploads/2024/11/image-65.png" alt="" class="wp-image-38722" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-65.png 319w, https://lycos7560.com/wp-content/uploads/2024/11/image-65-280x300.png 280w" sizes="(max-width: 319px) 100vw, 319px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.34%">
<figure class="wp-block-image size-full"><img decoding="async" width="1091" height="731" src="https://lycos7560.com/wp-content/uploads/2024/11/image-58.png" alt="" class="wp-image-38715" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-58.png 1091w, https://lycos7560.com/wp-content/uploads/2024/11/image-58-300x201.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-58-768x515.png 768w" sizes="(max-width: 1091px) 100vw, 1091px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="672" height="599" src="https://lycos7560.com/wp-content/uploads/2024/11/image-59.png" alt="" class="wp-image-38716" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-59.png 672w, https://lycos7560.com/wp-content/uploads/2024/11/image-59-300x267.png 300w" sizes="(max-width: 672px) 100vw, 672px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1066" height="750" src="https://lycos7560.com/wp-content/uploads/2024/11/image-60.png" alt="" class="wp-image-38717" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-60.png 1066w, https://lycos7560.com/wp-content/uploads/2024/11/image-60-300x211.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-60-768x540.png 768w" sizes="(max-width: 1066px) 100vw, 1066px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="304" height="432" src="https://lycos7560.com/wp-content/uploads/2024/11/image-61.png" alt="" class="wp-image-38718" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-61.png 304w, https://lycos7560.com/wp-content/uploads/2024/11/image-61-211x300.png 211w" sizes="(max-width: 304px) 100vw, 304px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="528" height="628" src="https://lycos7560.com/wp-content/uploads/2024/11/image-62.png" alt="" class="wp-image-38719" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-62.png 528w, https://lycos7560.com/wp-content/uploads/2024/11/image-62-252x300.png 252w" sizes="(max-width: 528px) 100vw, 528px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1034" height="568" src="https://lycos7560.com/wp-content/uploads/2024/11/image-63.png" alt="" class="wp-image-38720" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-63.png 1034w, https://lycos7560.com/wp-content/uploads/2024/11/image-63-300x165.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-63-768x422.png 768w" sizes="(max-width: 1034px) 100vw, 1034px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1005" height="434" src="https://lycos7560.com/wp-content/uploads/2024/11/image-64.png" alt="" class="wp-image-38721" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-64.png 1005w, https://lycos7560.com/wp-content/uploads/2024/11/image-64-300x130.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-64-768x332.png 768w" sizes="(max-width: 1005px) 100vw, 1005px" /></figure>
</div>
</div>



<figure class="wp-block-image size-full"><img decoding="async" width="1593" height="225" src="https://lycos7560.com/wp-content/uploads/2024/11/image-66.png" alt="" class="wp-image-38723" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-66.png 1593w, https://lycos7560.com/wp-content/uploads/2024/11/image-66-300x42.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-66-768x108.png 768w, https://lycos7560.com/wp-content/uploads/2024/11/image-66-1536x217.png 1536w" sizes="(max-width: 1593px) 100vw, 1593px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1359" height="598" src="https://lycos7560.com/wp-content/uploads/2024/11/image-67.png" alt="" class="wp-image-38724" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-67.png 1359w, https://lycos7560.com/wp-content/uploads/2024/11/image-67-300x132.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-67-768x338.png 768w" sizes="(max-width: 1359px) 100vw, 1359px" /></figure>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="940" height="534" src="https://lycos7560.com/wp-content/uploads/2024/11/image-68.png" alt="" class="wp-image-38725" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-68.png 940w, https://lycos7560.com/wp-content/uploads/2024/11/image-68-300x170.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-68-768x436.png 768w" sizes="(max-width: 940px) 100vw, 940px" /><figcaption class="wp-element-caption">계정 생성</figcaption></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1435" height="379" src="https://lycos7560.com/wp-content/uploads/2024/11/image-69.png" alt="" class="wp-image-38726" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-69.png 1435w, https://lycos7560.com/wp-content/uploads/2024/11/image-69-300x79.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-69-768x203.png 768w" sizes="(max-width: 1435px) 100vw, 1435px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-full"><img decoding="async" width="927" height="637" data-id="38727" src="https://lycos7560.com/wp-content/uploads/2024/11/image-70.png" alt="" class="wp-image-38727" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-70.png 927w, https://lycos7560.com/wp-content/uploads/2024/11/image-70-300x206.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-70-768x528.png 768w" sizes="(max-width: 927px) 100vw, 927px" /></figure>
</figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="939" height="447" src="https://lycos7560.com/wp-content/uploads/2024/11/image-71.png" alt="" class="wp-image-38728" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-71.png 939w, https://lycos7560.com/wp-content/uploads/2024/11/image-71-300x143.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-71-768x366.png 768w" sizes="(max-width: 939px) 100vw, 939px" /></figure>
</div>
</div>



<figure class="wp-block-image size-full"><img decoding="async" width="942" height="762" src="https://lycos7560.com/wp-content/uploads/2024/11/image-72.png" alt="" class="wp-image-38729" srcset="https://lycos7560.com/wp-content/uploads/2024/11/image-72.png 942w, https://lycos7560.com/wp-content/uploads/2024/11/image-72-300x243.png 300w, https://lycos7560.com/wp-content/uploads/2024/11/image-72-768x621.png 768w" sizes="(max-width: 942px) 100vw, 942px" /></figure>
<p>The post <a href="https://lycos7560.com/c/deploying-asp-net-web-api-to-azure/38646/">Deploying ASP.NET Web API To Azure</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/c/deploying-asp-net-web-api-to-azure/38646/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Consuming REST Web APIs</title>
		<link>https://lycos7560.com/c/consuming-rest-web-apis/38585/</link>
					<comments>https://lycos7560.com/c/consuming-rest-web-apis/38585/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Thu, 31 Oct 2024 09:56:32 +0000</pubDate>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[.Net Core]]></category>
		<category><![CDATA[AddModelError]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[ASP.NET Core]]></category>
		<category><![CDATA[Consuming]]></category>
		<category><![CDATA[Controller]]></category>
		<category><![CDATA[Create]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Data access logic]]></category>
		<category><![CDATA[DataBase]]></category>
		<category><![CDATA[DbContext]]></category>
		<category><![CDATA[DbSet]]></category>
		<category><![CDATA[DELETE]]></category>
		<category><![CDATA[Domain]]></category>
		<category><![CDATA[Domain Model]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[FileDescription]]></category>
		<category><![CDATA[Filestream]]></category>
		<category><![CDATA[GET]]></category>
		<category><![CDATA[IFormFile]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Image Controller]]></category>
		<category><![CDATA[IsValid]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Model]]></category>
		<category><![CDATA[ModelState]]></category>
		<category><![CDATA[pepe]]></category>
		<category><![CDATA[POST]]></category>
		<category><![CDATA[program]]></category>
		<category><![CDATA[Program.cs]]></category>
		<category><![CDATA[PUT]]></category>
		<category><![CDATA[Repository]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[REST Web API]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[Upload]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[web API]]></category>
		<category><![CDATA[wpf]]></category>
		<category><![CDATA[기초]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=38585</guid>

					<description><![CDATA[<p>Consuming REST Web APIs 1. 프로젝트 생성(MVC UI) ASP.Net Core Web App (MVC) 2. GET Controller 생성 HttpClient 적용 .Net에서 제공하는 HttpClient Class https://learn.microsoft.com/ko-kr/dotnet/api/system.net.http.httpclient?view=net-8.0 HTTP 요청을 보내고 URI로 식별된 리소스에서 HTTP 응답을 수신하기 위한 클래스를 제공합니다. 사용 예제 HttpClient를 사용하려면, Program.cs 파일에 HttpClient Factory를 설정 이를 통해 효율적으로 HttpClient 인스턴스를 관리하고, 특히 성능 문제를 해결할 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/c/consuming-rest-web-apis/38585/">Consuming REST Web APIs</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Consuming REST Web APIs</h2>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>


				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-b7f87031      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#consuming-rest-web-apis" class="uagb-toc-link__trigger">Consuming REST Web APIs</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#1-프로젝트-생성mvc-ui" class="uagb-toc-link__trigger">1. 프로젝트 생성(MVC UI)</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#2-get-controller-생성" class="uagb-toc-link__trigger">2. GET Controller 생성</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#httpclient-적용" class="uagb-toc-link__trigger">HttpClient 적용</a></li></ul><li class="uagb-toc__list"><a href="#3-indexcshtml-layoutcshtml-생성-및-수정" class="uagb-toc-link__trigger">3. Index.cshtml , _Layout.cshtml 생성 및 수정</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#4-regiondtocs-생성-및-indexcshtml-적용" class="uagb-toc-link__trigger">4. RegionDto.cs 생성 및 Index.cshtml 적용</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#5-post-method-생성" class="uagb-toc-link__trigger">5. POST Method 생성</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#6-단일-편집-기능" class="uagb-toc-link__trigger">6. 단일 편집 기능</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#7-삭제-기능" class="uagb-toc-link__trigger">7. 삭제 기능</a></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">1. 프로젝트 생성(MVC UI)</h3>



<p>ASP.Net Core Web App (MVC)</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="807" height="611" src="https://lycos7560.com/wp-content/uploads/2024/10/image-154.png" alt="" class="wp-image-38586" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-154.png 807w, https://lycos7560.com/wp-content/uploads/2024/10/image-154-300x227.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-154-768x581.png 768w" sizes="(max-width: 807px) 100vw, 807px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1005" height="626" src="https://lycos7560.com/wp-content/uploads/2024/10/image-155.png" alt="" class="wp-image-38587" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-155.png 1005w, https://lycos7560.com/wp-content/uploads/2024/10/image-155-300x187.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-155-768x478.png 768w" sizes="(max-width: 1005px) 100vw, 1005px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1207" height="800" src="https://lycos7560.com/wp-content/uploads/2024/10/image-156.png" alt="" class="wp-image-38588" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-156.png 1207w, https://lycos7560.com/wp-content/uploads/2024/10/image-156-300x199.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-156-768x509.png 768w" sizes="(max-width: 1207px) 100vw, 1207px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="957" height="805" src="https://lycos7560.com/wp-content/uploads/2024/10/image-157.png" alt="" class="wp-image-38589" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-157.png 957w, https://lycos7560.com/wp-content/uploads/2024/10/image-157-300x252.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-157-768x646.png 768w" sizes="(max-width: 957px) 100vw, 957px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="787" height="539" src="https://lycos7560.com/wp-content/uploads/2024/10/image-158.png" alt="" class="wp-image-38590" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-158.png 787w, https://lycos7560.com/wp-content/uploads/2024/10/image-158-300x205.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-158-768x526.png 768w" sizes="(max-width: 787px) 100vw, 787px" /><figcaption class="wp-element-caption">여러 개의 시작 프로젝트로 변경</figcaption></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1905" height="1023" src="https://lycos7560.com/wp-content/uploads/2024/10/image-159.png" alt="" class="wp-image-38591" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-159.png 1905w, https://lycos7560.com/wp-content/uploads/2024/10/image-159-300x161.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-159-768x412.png 768w, https://lycos7560.com/wp-content/uploads/2024/10/image-159-1536x825.png 1536w" sizes="(max-width: 1905px) 100vw, 1905px" /><figcaption class="wp-element-caption">MVC UI와 API(Swagger)</figcaption></figure>
</div>
</div>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">2. GET Controller 생성</h3>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1286" height="394" src="https://lycos7560.com/wp-content/uploads/2024/10/image-160.png" alt="" class="wp-image-38592" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-160.png 1286w, https://lycos7560.com/wp-content/uploads/2024/10/image-160-300x92.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-160-768x235.png 768w" sizes="(max-width: 1286px) 100vw, 1286px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="935" height="406" src="https://lycos7560.com/wp-content/uploads/2024/10/image-161.png" alt="" class="wp-image-38593" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-161.png 935w, https://lycos7560.com/wp-content/uploads/2024/10/image-161-300x130.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-161-768x333.png 768w" sizes="(max-width: 935px) 100vw, 935px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="992" height="431" src="https://lycos7560.com/wp-content/uploads/2024/10/image-162.png" alt="" class="wp-image-38594" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-162.png 992w, https://lycos7560.com/wp-content/uploads/2024/10/image-162-300x130.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-162-768x334.png 768w" sizes="(max-width: 992px) 100vw, 992px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1251" height="440" src="https://lycos7560.com/wp-content/uploads/2024/10/image-171.png" alt="" class="wp-image-38603" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-171.png 1251w, https://lycos7560.com/wp-content/uploads/2024/10/image-171-300x106.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-171-768x270.png 768w" sizes="(max-width: 1251px) 100vw, 1251px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="737" height="619" src="https://lycos7560.com/wp-content/uploads/2024/10/image-172.png" alt="" class="wp-image-38604" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-172.png 737w, https://lycos7560.com/wp-content/uploads/2024/10/image-172-300x252.png 300w" sizes="(max-width: 737px) 100vw, 737px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1032" height="440" src="https://lycos7560.com/wp-content/uploads/2024/10/image-177.png" alt="" class="wp-image-38609" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-177.png 1032w, https://lycos7560.com/wp-content/uploads/2024/10/image-177-300x128.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-177-768x327.png 768w" sizes="(max-width: 1032px) 100vw, 1032px" /></figure>
</div>
</div>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">HttpClient 적용</h4>



<p>.Net에서 제공하는 <strong>HttpClient Class</strong></p>



<p><a href="https://learn.microsoft.com/ko-kr/dotnet/api/system.net.http.httpclient?view=net-8.0" target="_blank" rel="noreferrer noopener">https://learn.microsoft.com/ko-kr/dotnet/api/system.net.http.httpclient?view=net-8.0</a></p>



<p>HTTP 요청을 보내고 URI로 식별된 리소스에서 HTTP 응답을 수신하기 위한 클래스를 제공합니다.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">public class HttpClient : System.Net.Http.HttpMessageInvoker</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p><strong>사용 예제</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// HttpClient는 매번 사용될 때마다 인스턴스화되지 않고, 애플리케이션 전체에서 한 번만 인스턴스화되어야 합니다. 참고 사항을 참조하세요.
static readonly HttpClient client = new HttpClient();

static async Task Main()
{
    // 비동기 네트워크 메서드를 try/catch 블록 내에서 호출하여 예외를 처리합니다.
    try
    {
        // 비동기적으로 GET 요청을 보냅니다.
        using HttpResponseMessage response = await client.GetAsync("http://www.contoso.com/");
        
        // 요청이 성공적으로 완료되었는지 확인합니다.
        response.EnsureSuccessStatusCode();
        
        // 응답 본문을 문자열로 읽어옵니다.
        string responseBody = await response.Content.ReadAsStringAsync();
        
        // 위의 세 줄은 아래 새로운 헬퍼 메서드로 대체할 수 있습니다.
        // string responseBody = await client.GetStringAsync(uri);
        
        // 응답 본문을 콘솔에 출력합니다.
        Console.WriteLine(responseBody);
    }
    catch (HttpRequestException e)
    {
        // 예외가 발생했을 때 예외 메시지를 콘솔에 출력합니다.
        Console.WriteLine("\nException Caught!");
        Console.WriteLine("Message :{0} ", e.Message);
    }
}
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p><a href="https://learn.microsoft.com/ko-kr/dotnet/api/system.net.http.httpclient?view=net-8.0#remarks"></a></p>



<p>HttpClient를 사용하려면, Program.cs 파일에 HttpClient Factory를 설정</p>



<p>이를 통해 효율적으로 <strong>HttpClient 인스턴스를 관리하고, 특히 성능 문제를 해결</strong>할 수 있음</p>



<p>Program.cs</p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllersWithViews();

// HttpClient 삽입
builder.Services.AddHttpClient();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
    app.UseExceptionHandler("/Home/Error");
    // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
    app.UseHsts();
}

app.UseHttpsRedirection();
app.UseStaticFiles();

app.UseRouting();

app.UseAuthorization();

app.MapControllerRoute(
    name: "default",
    pattern: "{controller=Home}/{action=Index}/{id?}");

app.Run();
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="920" height="469" src="https://lycos7560.com/wp-content/uploads/2024/10/image-178.png" alt="" class="wp-image-38610" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-178.png 920w, https://lycos7560.com/wp-content/uploads/2024/10/image-178-300x153.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-178-768x392.png 768w" sizes="(max-width: 920px) 100vw, 920px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1077" height="459" src="https://lycos7560.com/wp-content/uploads/2024/10/image-179.png" alt="" class="wp-image-38611" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-179.png 1077w, https://lycos7560.com/wp-content/uploads/2024/10/image-179-300x128.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-179-768x327.png 768w" sizes="(max-width: 1077px) 100vw, 1077px" /><figcaption class="wp-element-caption">NZWalks.API의 launchSettings.json</figcaption></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1306" height="778" src="https://lycos7560.com/wp-content/uploads/2024/10/image-180.png" alt="" class="wp-image-38612" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-180.png 1306w, https://lycos7560.com/wp-content/uploads/2024/10/image-180-300x179.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-180-768x458.png 768w" sizes="(max-width: 1306px) 100vw, 1306px" /><figcaption class="wp-element-caption">RegionsController의 GetAll Api를 사용</figcaption></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="907" height="668" src="https://lycos7560.com/wp-content/uploads/2024/10/image-181.png" alt="" class="wp-image-38613" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-181.png 907w, https://lycos7560.com/wp-content/uploads/2024/10/image-181-300x221.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-181-768x566.png 768w" sizes="(max-width: 907px) 100vw, 907px" /><figcaption class="wp-element-caption">테스트를 위해서 인증 주석</figcaption></figure>
</div>
</div>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p><strong>RegionsController.cs 수정</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">using Microsoft.AspNetCore.Mvc;

namespace NZWalksUI.Controllers
{
    public class RegionsController : Controller
    {
        private readonly IHttpClientFactory httpClientFactory;

        // Http 클라이언트 팩토리를 삽입하기 위한 생성자를 생성
        public RegionsController(IHttpClientFactory httpClientFactory)
        {
            this.httpClientFactory = httpClientFactory;
        }

        // Index 액션 메서드
        public async Task&lt;IActionResult> Index()
        {
            try
            {
                // Get All Regions From Web API
                // 새로운 Http 클라이언트가 생성
                var client = httpClientFactory.CreateClient();
                
                // Web API로 GET 요청을 보냄
                var httpResponseMessage = await client.GetAsync("https://localhost:7256/api/regions");
                
                // 요청이 성공적으로 완료되었는지 확인
                httpResponseMessage.EnsureSuccessStatusCode();
                
                // 응답 본문을 문자열로 읽어옴
                var stringResponse = await httpResponseMessage.Content.ReadAsStringAsync();
                
                // 응답 내용을 ViewBag에 저장
                ViewBag.Response = stringResponse;
                
                // 응답 메시지를 반환
                return Ok(httpResponseMessage);
            }
            catch (Exception ex)
            {
                // 예외를 로깅 (로그 기록)
            }
            
            // View를 반환
            return View();
        }
    }
}
</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">3. Index.cshtml , <strong>_Layout.cshtml </strong>생성 및 수정 </h3>



<p><strong>Index.cshtml</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="html" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}

&lt;h1 class="mt-3">Regions&lt;/h1>

@if (ViewBag.Respose is not null)
{
    &lt;p>ViewBag.Respose&lt;/p>
}</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p><strong>_Layout.cshtml</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="html" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;!DOCTYPE html>
&lt;html lang="en">
&lt;head>
    &lt;meta charset="utf-8" />
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0" />
    &lt;title>@ViewData["Title"] - NZWalksUI&lt;/title>
    &lt;link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
    &lt;link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
    &lt;link rel="stylesheet" href="~/NZWalksUI.styles.css" asp-append-version="true" />
&lt;/head>
&lt;body>
    &lt;header>
        &lt;nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
            &lt;div class="container-fluid">
                &lt;a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">NZWalksUI&lt;/a>
                &lt;button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
                        aria-expanded="false" aria-label="Toggle navigation">
                    &lt;span class="navbar-toggler-icon">&lt;/span>
                &lt;/button>
                &lt;div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
                    &lt;ul class="navbar-nav flex-grow-1">
                        &lt;li class="nav-item">
                            &lt;a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home&lt;/a>
                        &lt;/li>
                        &lt;li class="nav-item">
                            &lt;a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy&lt;/a>
                        &lt;/li>
                        &lt;li class="nav-item">
                            &lt;a class="nav-link text-dark" asp-area="" asp-controller="Regions" asp-action="Index">Regions&lt;/a>
                        &lt;/li>
                    &lt;/ul>
                &lt;/div>
            &lt;/div>
        &lt;/nav>
    &lt;/header>
    &lt;div class="container">
        &lt;main role="main" class="pb-3">
            @RenderBody()
        &lt;/main>
    &lt;/div>

    &lt;footer class="border-top footer text-muted">
        &lt;div class="container">
            &amp;copy; 2024 - NZWalksUI - &lt;a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy&lt;/a>
        &lt;/div>
    &lt;/footer>
    &lt;script src="~/lib/jquery/dist/jquery.min.js">&lt;/script>
    &lt;script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js">&lt;/script>
    &lt;script src="~/js/site.js" asp-append-version="true">&lt;/script>
    @await RenderSectionAsync("Scripts", required: false)
&lt;/body>
&lt;/html>
</pre>



<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1261" height="380" src="https://lycos7560.com/wp-content/uploads/2024/10/image-184.png" alt="" class="wp-image-38616" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-184.png 1261w, https://lycos7560.com/wp-content/uploads/2024/10/image-184-300x90.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-184-768x231.png 768w" sizes="(max-width: 1261px) 100vw, 1261px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1553" height="518" src="https://lycos7560.com/wp-content/uploads/2024/10/image-182.png" alt="" class="wp-image-38617" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-182.png 1553w, https://lycos7560.com/wp-content/uploads/2024/10/image-182-300x100.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-182-768x256.png 768w, https://lycos7560.com/wp-content/uploads/2024/10/image-182-1536x512.png 1536w" sizes="(max-width: 1553px) 100vw, 1553px" /><figcaption class="wp-element-caption">폴더 이름 수정</figcaption></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1308" height="556" src="https://lycos7560.com/wp-content/uploads/2024/10/image-183.png" alt="" class="wp-image-38618" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-183.png 1308w, https://lycos7560.com/wp-content/uploads/2024/10/image-183-300x128.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-183-768x326.png 768w" sizes="(max-width: 1308px) 100vw, 1308px" /><figcaption class="wp-element-caption">break point</figcaption></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1381" height="600" src="https://lycos7560.com/wp-content/uploads/2024/10/image-186.png" alt="" class="wp-image-38620" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-186.png 1381w, https://lycos7560.com/wp-content/uploads/2024/10/image-186-300x130.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-186-768x334.png 768w" sizes="(max-width: 1381px) 100vw, 1381px" /><figcaption class="wp-element-caption">API 적용 확인</figcaption></figure>
</div>
</div>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">4. RegionDto.cs 생성 및 Index.cshtml 적용</h3>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p><strong>RegionDto.cs</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">namespace NZWalksUI.Models.DTO
{
    public class RegionDto
    {
        public Guid Id { get; set; }
        public string Code { get; set; }
        public string Name { get; set; }
        public string? RegionImageUrl { get; set; } // Nullable
    }
}</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p><strong>Index.cshtml </strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="html" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">@model IEnumerable&lt;NZWalksUI.Models.DTO.RegionDto> &lt;!-- 뷰 모델을 IEnumerable&lt;RegionDto>로 설정 -->

@* MVC를 빈 프로젝트에 대해 활성화하는 방법에 대한 추가 정보는 https://go.microsoft.com/fwlink/?LinkID=397860를 참조 *@

@{} &lt;!-- 블록 코드, 현재 비어 있음 -->

&lt;h1 class="mt-3">Regions&lt;/h1> &lt;!-- 페이지 제목 -->

&lt;table>
    &lt;thead>
        &lt;tr>
            &lt;th>Id&lt;/th> &lt;!-- Id 열 -->
            &lt;th>Code&lt;/th> &lt;!-- Code 열 -->
            &lt;th>Name&lt;/th> &lt;!-- Name 열 -->
        &lt;/tr>
    &lt;/thead>
    &lt;tbody>
        @foreach (var walk in Model) &lt;!-- Model을 반복하여 각 walk에 대해 테이블 행 생성 -->
        {
            &lt;tr>
                &lt;th>@walk.Id&lt;/th> &lt;!-- 현재 walk의 Id 표시 -->
                &lt;th>@walk.Code&lt;/th> &lt;!-- 현재 walk의 Code 표시 -->
                &lt;th>@walk.Name&lt;/th> &lt;!-- 현재 walk의 Name 표시 -->
            &lt;/tr>
        }
    &lt;/tbody>
&lt;/table>
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1188" height="696" src="https://lycos7560.com/wp-content/uploads/2024/10/image-187.png" alt="" class="wp-image-38621" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-187.png 1188w, https://lycos7560.com/wp-content/uploads/2024/10/image-187-300x176.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-187-768x450.png 768w" sizes="(max-width: 1188px) 100vw, 1188px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1360" height="575" src="https://lycos7560.com/wp-content/uploads/2024/10/image-188.png" alt="" class="wp-image-38622" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-188.png 1360w, https://lycos7560.com/wp-content/uploads/2024/10/image-188-300x127.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-188-768x325.png 768w" sizes="(max-width: 1360px) 100vw, 1360px" /></figure>
</div>
</div>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">5. POST Method 생성 </h3>



<p><strong>Index.cshtml 수정</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="html" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">@model IEnumerable&lt;NZWalksUI.Models.DTO.RegionDto>
@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}

&lt;h1 class="mt-3">Regions&lt;/h1>

&lt;div class="d-flex justify-content-end">
    &lt;a class="btn btn-secondary" asp-controller="Regions" asp-action="Add">Add Region&lt;/a>
&lt;/div>


&lt;table class="table-bordered">
    &lt;thead>
        &lt;tr>
            &lt;th>Id&lt;/th>
            &lt;th>Code&lt;/th>
            &lt;th>Name&lt;/th>
        &lt;/tr>
    &lt;/thead>
    &lt;tbody>
        @foreach (var walk in Model)
        {
            &lt;tr>
                &lt;td>@walk.Id&lt;/td>
                &lt;td>@walk.Code&lt;/td>
                &lt;td>@walk.Name&lt;/td>
            &lt;/tr>
        }
    &lt;/tbody>
&lt;/table></pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p><strong>AddRegionViewModel.cs 생성</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">namespace NZWalksUI.Models
{
    public class AddRegionViewModel
    {
        public string Code { get; set; }
        public string Name { get; set; }
        public string RegionImageUrl { get; set; }
    }
}
</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p><strong>RegionsController.cs 수정</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">using Microsoft.AspNetCore.Mvc;
using NZWalksUI.Models;
using NZWalksUI.Models.DTO;
using System.Net.Http;
using System.Text;
using System.Text.Json;

namespace NZWalksUI.Controllers
{
    public class RegionsController : Controller
    {
        private readonly IHttpClientFactory httpClientFactory;

        // Http 클라이언트 팩토리를 삽입하기 위한 생성자를 생성
        public RegionsController(IHttpClientFactory httpClientFactory)
        {
            this.httpClientFactory = httpClientFactory;
        }

        [HttpGet]
        // Index 액션 메서드
        public async Task&lt;IActionResult> Index()
        {
            List&lt;RegionDto> response = new List&lt;RegionDto>();
            try
            {
                // Get All Regions From Web API
                // 새로운 Http 클라이언트가 생성
                var client = httpClientFactory.CreateClient();

                // Web API로 GET 요청을 보냄
                var httpResponseMessage = await client.GetAsync("https://localhost:7256/api/regions");

                // 요청이 성공적으로 완료되었는지 확인
                httpResponseMessage.EnsureSuccessStatusCode();

                // 응답 본문을 JSON으로 읽어와 리스트에 추가
                response.AddRange(await httpResponseMessage.Content.ReadFromJsonAsync&lt;IEnumerable&lt;RegionDto>>());
            }
            catch (HttpRequestException e)
            {
                // 예외 발생 시 예외 메시지를 로그로 기록
                Console.WriteLine($"Request error: {e.Message}");
            }
            catch (Exception ex)
            {
                // 기타 예외 발생 시 예외 메시지를 로그로 기록
                Console.WriteLine($"An error occurred: {ex.Message}");
            }

            // View를 반환
            return View(response);
        }

        [HttpGet]
        public IActionResult Add()
        {
            return View(); // Add View 반환
        }

        [HttpPost]
        public async Task&lt;IActionResult> Add(AddRegionViewModel model)
        {
            var client = httpClientFactory.CreateClient();

            var httpRequestMessage = new HttpRequestMessage()
            {
                Method = HttpMethod.Post,
                RequestUri = new Uri("https://localhost:7256/api/regions"),
                Content = new StringContent(JsonSerializer.Serialize(model), Encoding.UTF8, "application/json") // JSON 요청 본문 설정
            };

            var httpResponseMessage = await client.SendAsync(httpRequestMessage);
            httpResponseMessage.EnsureSuccessStatusCode(); // 요청이 성공적으로 완료되었는지 확인

            var response = await httpResponseMessage.Content.ReadFromJsonAsync&lt;RegionDto>();

            if (response is not null)
            {
                return RedirectToAction("Index", "Regions"); // Index 액션으로 리디렉션
            }

            return View(); // View 반환
        }
    }
}
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="553" height="334" src="https://lycos7560.com/wp-content/uploads/2024/10/image-193.png" alt="" class="wp-image-38627" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-193.png 553w, https://lycos7560.com/wp-content/uploads/2024/10/image-193-300x181.png 300w" sizes="(max-width: 553px) 100vw, 553px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<p><strong>Add.cshtml</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="css" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">@model NZWalksUI.Models.AddRegionViewModel;

@*
*@

@{
}

&lt;h1 class="mt-3">Add Region&lt;/h1>

&lt;form method="post">

    &lt;div class="mt-3">
        &lt;label class="form-label">Code&lt;/label>
        &lt;input type="text" class="form-control" asp-for="Code" />
    &lt;/div>

    &lt;div class="mt-3">
        &lt;label class="form-label">Name&lt;/label>
        &lt;input type="text" class="form-control" asp-for="Name" />
    &lt;/div>

    &lt;div class="mt-3">
        &lt;label class="form-label">Image URL&lt;/label>
        &lt;input type="text" class="form-control" asp-for="RegionImageUrl" />
    &lt;/div>

    &lt;div class="mt-3">
        &lt;button type="submit" class="btn btn-primary">Save&lt;/button>
    &lt;/div>

&lt;/form></pre>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="831" height="346" src="https://lycos7560.com/wp-content/uploads/2024/10/image-194.png" alt="" class="wp-image-38628" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-194.png 831w, https://lycos7560.com/wp-content/uploads/2024/10/image-194-300x125.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-194-768x320.png 768w" sizes="(max-width: 831px) 100vw, 831px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1175" height="462" src="https://lycos7560.com/wp-content/uploads/2024/10/image-195.png" alt="" class="wp-image-38630" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-195.png 1175w, https://lycos7560.com/wp-content/uploads/2024/10/image-195-300x118.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-195-768x302.png 768w" sizes="(max-width: 1175px) 100vw, 1175px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1013" height="436" src="https://lycos7560.com/wp-content/uploads/2024/10/image-196.png" alt="" class="wp-image-38631" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-196.png 1013w, https://lycos7560.com/wp-content/uploads/2024/10/image-196-300x129.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-196-768x331.png 768w" sizes="(max-width: 1013px) 100vw, 1013px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="903" height="407" src="https://lycos7560.com/wp-content/uploads/2024/10/image-197.png" alt="" class="wp-image-38632" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-197.png 903w, https://lycos7560.com/wp-content/uploads/2024/10/image-197-300x135.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-197-768x346.png 768w" sizes="(max-width: 903px) 100vw, 903px" /></figure>
</div>
</div>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">6. 단일 편집 기능</h3>



<p><strong>RegionsController.cs 수정</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">using Microsoft.AspNetCore.Mvc;
using NZWalksUI.Models;
using NZWalksUI.Models.DTO;
using System.Net.Http;
using System.Text;
using System.Text.Json;

namespace NZWalksUI.Controllers
{
    public class RegionsController : Controller
    {
        private readonly IHttpClientFactory httpClientFactory;

        // Http 클라이언트 팩토리를 삽입하기 위한 생성자를 생성
        public RegionsController(IHttpClientFactory httpClientFactory)
        {
            this.httpClientFactory = httpClientFactory;
        }

        [HttpGet]
        // Index 액션 메서드
        public async Task&lt;IActionResult> Index()
        {
            List&lt;RegionDto> response = new List&lt;RegionDto>();


            try
            {
                // Get All Regions From Web API
                // 새로운 Http 클라이언트가 생성
                var client = httpClientFactory.CreateClient();

                // Web API로 GET 요청을 보냄
                var httpResponseMessage = await client.GetAsync("https://localhost:7256/api/regions");
               

                // 요청이 성공적으로 완료되었는지 확인
                httpResponseMessage.EnsureSuccessStatusCode();

                // // 응답 본문을 문자열로 읽어옴
                // var stringResponse = await httpResponseMessage.Content.ReadAsStringAsync();


                response.AddRange(await httpResponseMessage.Content.ReadFromJsonAsync&lt;IEnumerable&lt;RegionDto>>());

            }
            catch (HttpRequestException e)
            {
                // 예외 발생 시 예외 메시지를 로그로 기록
                Console.WriteLine($"Request error: {e.Message}");
            }
            catch (Exception ex)
            {
                // 기타 예외 발생 시 예외 메시지를 로그로 기록
                Console.WriteLine($"An error occurred: {ex.Message}");
            }

            // View를 반환
            return View(response);
        }

        [HttpGet]
        public IActionResult Add()
        { 
            return View();
        }

        [HttpPost]
        public async Task&lt;IActionResult> Add(AddRegionViewModel model)
        {
            var client = httpClientFactory.CreateClient();

            var httpRequestMessage = new HttpRequestMessage()
            {
                Method = HttpMethod.Post,
                RequestUri = new Uri("https://localhost:7256/api/regions"),
                Content = new StringContent(JsonSerializer.Serialize(model), Encoding.UTF8, "application/json")
            };

            var httpResponseMessage = await client.SendAsync(httpRequestMessage);
            httpResponseMessage.EnsureSuccessStatusCode();

            var respose = await httpResponseMessage.Content.ReadFromJsonAsync&lt;RegionDto>();

            if (respose is not null)
            {
                return RedirectToAction("Index", "Regions");
            }

            return View();
        }

        [HttpGet]
        public async Task&lt;IActionResult> Edit(Guid id)
        {
            ViewBag.Id = id;
            return View();
        
        }
    }
}
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="502" height="194" src="https://lycos7560.com/wp-content/uploads/2024/10/image-198.png" alt="" class="wp-image-38633" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-198.png 502w, https://lycos7560.com/wp-content/uploads/2024/10/image-198-300x116.png 300w" sizes="(max-width: 502px) 100vw, 502px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>Edite View 생성</p>



<p><strong>Edit.cshtml</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="html" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}

&lt;h1 class="mt-3">Edit Region&lt;/h1>

&lt;p>
    @ViewBag.Id
&lt;/p>
</pre>



<div style="height:41px" aria-hidden="true" class="wp-block-spacer"></div>



<p><strong>Index.cshtml 수정</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="html" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">@model IEnumerable&lt;NZWalksUI.Models.DTO.RegionDto>
@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}

&lt;h1 class="mt-3">Regions&lt;/h1>

&lt;div class="d-flex justify-content-end">
    &lt;a class="btn btn-secondary" asp-controller="Regions" asp-action="Add">Add Region&lt;/a>
&lt;/div>


&lt;table class="table-bordered">
    &lt;thead>
        &lt;tr>
            &lt;th>Id&lt;/th>
            &lt;th>Code&lt;/th>
            &lt;th>Name&lt;/th>
            &lt;th> &lt;/th>
        &lt;/tr>
    &lt;/thead>
    &lt;tbody>
        @foreach (var walk in Model)
        {
            &lt;tr>
                &lt;td>@walk.Id&lt;/td>
                &lt;td>@walk.Code&lt;/td>
                &lt;td>@walk.Name&lt;/td>
                &lt;td>
                    &lt;a asp-controller="Regions" asp-action="Edit" asp-route-id="@walk.Id" 
                    class="btn btn-light">Eidt&lt;/a>
                &lt;/td>
            &lt;/tr>
        }
    &lt;/tbody>
&lt;/table></pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="824" height="472" src="https://lycos7560.com/wp-content/uploads/2024/10/image-199.png" alt="" class="wp-image-38634" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-199.png 824w, https://lycos7560.com/wp-content/uploads/2024/10/image-199-300x172.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-199-768x440.png 768w" sizes="(max-width: 824px) 100vw, 824px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="776" height="369" src="https://lycos7560.com/wp-content/uploads/2024/10/image-201.png" alt="" class="wp-image-38636" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-201.png 776w, https://lycos7560.com/wp-content/uploads/2024/10/image-201-300x143.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-201-768x365.png 768w" sizes="(max-width: 776px) 100vw, 776px" /></figure>
</div>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide"/>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p><strong>Error.cshtml 수정</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="html" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">@model NZWalksUI.Models.DTO.RegionDto

@{
}

&lt;h1 class="mt-3">Edit Region&lt;/h1>

@if (Model is not null)
{
    &lt;form method="post">
        &lt;div class="mt-3">
            &lt;label class="form-label">Id&lt;/label>
            &lt;input type="text" class="form-control" asp-for="Id"  readonly/>
        &lt;/div>
        &lt;div class="mt-3">
            &lt;label class="form-label">Code&lt;/label>
            &lt;input type="text" class="form-control" asp-for="Code" />
        &lt;/div>

        &lt;div class="mt-3">
            &lt;label class="form-label">Name&lt;/label>
            &lt;input type="text" class="form-control" asp-for="Name" />
        &lt;/div>

        &lt;div class="mt-3">
            &lt;label class="form-label">Image URL&lt;/label>
            &lt;input type="text" class="form-control" asp-for="RegionImageUrl" />
        &lt;/div>

        &lt;div class="mt-3">
            &lt;button type="submit" class="btn btn-primary">Save&lt;/button>
        &lt;/div>

    &lt;/form>
}
</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p><strong>RegionsController.cs 수정</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">using Microsoft.AspNetCore.Mvc;
using NZWalksUI.Models;
using NZWalksUI.Models.DTO;
using System.Net.Http;
using System.Reflection;
using System.Text;
using System.Text.Json;
using static System.Net.WebRequestMethods;

namespace NZWalksUI.Controllers
{
    public class RegionsController : Controller
    {
        private readonly IHttpClientFactory httpClientFactory;

        // Http 클라이언트 팩토리를 삽입하기 위한 생성자를 생성
        public RegionsController(IHttpClientFactory httpClientFactory)
        {
            this.httpClientFactory = httpClientFactory;
        }

        [HttpGet]
        // Index 액션 메서드
        public async Task&lt;IActionResult> Index()
        {
            List&lt;RegionDto> response = new List&lt;RegionDto>();


            try
            {
                // Get All Regions From Web API
                // 새로운 Http 클라이언트가 생성
                var client = httpClientFactory.CreateClient();

                // Web API로 GET 요청을 보냄
                var httpResponseMessage = await client.GetAsync("https://localhost:7256/api/regions");
               

                // 요청이 성공적으로 완료되었는지 확인
                httpResponseMessage.EnsureSuccessStatusCode();

                // // 응답 본문을 문자열로 읽어옴
                // var stringResponse = await httpResponseMessage.Content.ReadAsStringAsync();


                response.AddRange(await httpResponseMessage.Content.ReadFromJsonAsync&lt;IEnumerable&lt;RegionDto>>());

            }
            catch (HttpRequestException e)
            {
                // 예외 발생 시 예외 메시지를 로그로 기록
                Console.WriteLine($"Request error: {e.Message}");
            }
            catch (Exception ex)
            {
                // 기타 예외 발생 시 예외 메시지를 로그로 기록
                Console.WriteLine($"An error occurred: {ex.Message}");
            }

            // View를 반환
            return View(response);
        }

        [HttpGet]
        public IActionResult Add()
        { 
            return View();
        }

        [HttpPost]
        public async Task&lt;IActionResult> Add(AddRegionViewModel model)
        {
            var client = httpClientFactory.CreateClient();

            var httpRequestMessage = new HttpRequestMessage()
            {
                Method = HttpMethod.Post,
                RequestUri = new Uri("https://localhost:7256/api/regions"),
                Content = new StringContent(JsonSerializer.Serialize(model), Encoding.UTF8, "application/json")
            };

            var httpResponseMessage = await client.SendAsync(httpRequestMessage);
            httpResponseMessage.EnsureSuccessStatusCode();

            var respose = await httpResponseMessage.Content.ReadFromJsonAsync&lt;RegionDto>();

            if (respose is not null)
            {
                return RedirectToAction("Index", "Regions");
            }

            return View();
        }

        [HttpGet]
        public async Task&lt;IActionResult> Edit(Guid id)
        {
            var client = httpClientFactory.CreateClient();

            var response = await client.GetFromJsonAsync&lt;RegionDto>($"https://localhost:7256/api/regions/{id.ToString()}");

            if (response is not null) 
            { 
                return View(response);
            }

            return View(null);
        
        }

        [HttpPost]
        public async Task&lt;IActionResult> Edit(RegionDto request) 
        {
            var client = httpClientFactory.CreateClient();

            var httpRequestMessage = new HttpRequestMessage()
            {
                Method = HttpMethod.Put,
                RequestUri = new Uri($"https://localhost:7256/api/regions/{request.Id}"),
                Content = new StringContent(JsonSerializer.Serialize(request), Encoding.UTF8, "application/json")
            };

            var httpResponseMessage = await client.SendAsync(httpRequestMessage);
            httpResponseMessage.EnsureSuccessStatusCode();

            var respose = await httpResponseMessage.Content.ReadFromJsonAsync&lt;RegionDto>();

            if (respose is not null)
            {
                return RedirectToAction("Edit", "Regions");
            }

            return View();
        }

    }
}
</pre>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="895" height="503" src="https://lycos7560.com/wp-content/uploads/2024/10/image-202.png" alt="" class="wp-image-38637" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-202.png 895w, https://lycos7560.com/wp-content/uploads/2024/10/image-202-300x169.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-202-768x432.png 768w" sizes="(max-width: 895px) 100vw, 895px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="884" height="478" src="https://lycos7560.com/wp-content/uploads/2024/10/image-204.png" alt="" class="wp-image-38639" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-204.png 884w, https://lycos7560.com/wp-content/uploads/2024/10/image-204-300x162.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-204-768x415.png 768w" sizes="(max-width: 884px) 100vw, 884px" /></figure>
</div>
</div>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">7. 삭제 기능</h3>



<p><strong>Edit.cshtml 수정</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="html" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">@model NZWalksUI.Models.DTO.RegionDto

@{
}

&lt;h1 class="mt-3">Edit Region&lt;/h1>

@if (Model is not null)
{
    &lt;form method="post">
        &lt;div class="mt-3">
            &lt;label class="form-label">Id&lt;/label>
            &lt;input type="text" class="form-control" asp-for="Id"  readonly/>
        &lt;/div>
        &lt;div class="mt-3">
            &lt;label class="form-label">Code&lt;/label>
            &lt;input type="text" class="form-control" asp-for="Code" />
        &lt;/div>

        &lt;div class="mt-3">
            &lt;label class="form-label">Name&lt;/label>
            &lt;input type="text" class="form-control" asp-for="Name" />
        &lt;/div>

        &lt;div class="mt-3">
            &lt;label class="form-label">Image URL&lt;/label>
            &lt;input type="text" class="form-control" asp-for="RegionImageUrl" />
        &lt;/div>

        &lt;div class="mt-3 d-flex justify-content-between">
            &lt;button type="submit" class="btn btn-primary">Save&lt;/button>
            &lt;button type="submit" asp-controller="Regions" asp-action="Delete" class="btn btn-danger">Delete&lt;/button>
        &lt;/div>

    &lt;/form>
}
</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p>RegionsController.cs 수정</p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">using Microsoft.AspNetCore.Mvc;
using NZWalksUI.Models;
using NZWalksUI.Models.DTO;
using System.Text;
using System.Text.Json;

namespace NZWalksUI.Controllers
{
    public class RegionsController : Controller
    {
        private readonly IHttpClientFactory httpClientFactory;

        // Http 클라이언트 팩토리를 삽입하기 위한 생성자를 생성
        public RegionsController(IHttpClientFactory httpClientFactory)
        {
            this.httpClientFactory = httpClientFactory;
        }

        [HttpGet]
        // Index 액션 메서드
        public async Task&lt;IActionResult> Index()
        {
            List&lt;RegionDto> response = new List&lt;RegionDto>();


            try
            {
                // Get All Regions From Web API
                // 새로운 Http 클라이언트가 생성
                var client = httpClientFactory.CreateClient();

                // Web API로 GET 요청을 보냄
                var httpResponseMessage = await client.GetAsync("https://localhost:7256/api/regions");
               

                // 요청이 성공적으로 완료되었는지 확인
                httpResponseMessage.EnsureSuccessStatusCode();

                // // 응답 본문을 문자열로 읽어옴
                // var stringResponse = await httpResponseMessage.Content.ReadAsStringAsync();


                response.AddRange(await httpResponseMessage.Content.ReadFromJsonAsync&lt;IEnumerable&lt;RegionDto>>());

            }
            catch (HttpRequestException e)
            {
                // 예외 발생 시 예외 메시지를 로그로 기록
                Console.WriteLine($"Request error: {e.Message}");
            }
            catch (Exception ex)
            {
                // 기타 예외 발생 시 예외 메시지를 로그로 기록
                Console.WriteLine($"An error occurred: {ex.Message}");
            }

            // View를 반환
            return View(response);
        }

        [HttpGet]
        public IActionResult Add()
        { 
            return View();
        }

        [HttpPost]
        public async Task&lt;IActionResult> Add(AddRegionViewModel model)
        {
            var client = httpClientFactory.CreateClient();

            var httpRequestMessage = new HttpRequestMessage()
            {
                Method = HttpMethod.Post,
                RequestUri = new Uri("https://localhost:7256/api/regions"),
                Content = new StringContent(JsonSerializer.Serialize(model), Encoding.UTF8, "application/json")
            };

            var httpResponseMessage = await client.SendAsync(httpRequestMessage);
            httpResponseMessage.EnsureSuccessStatusCode();

            var respose = await httpResponseMessage.Content.ReadFromJsonAsync&lt;RegionDto>();

            if (respose is not null)
            {
                return RedirectToAction("Index", "Regions");
            }

            return View();
        }

        [HttpGet]
        public async Task&lt;IActionResult> Edit(Guid id)
        {
            var client = httpClientFactory.CreateClient();

            var response = await client.GetFromJsonAsync&lt;RegionDto>($"https://localhost:7256/api/regions/{id.ToString()}");

            if (response is not null) 
            { 
                return View(response);
            }

            return View(null);
        
        }

        [HttpPost]
        public async Task&lt;IActionResult> Edit(RegionDto request) 
        {
            var client = httpClientFactory.CreateClient();

            var httpRequestMessage = new HttpRequestMessage()
            {
                Method = HttpMethod.Put,
                RequestUri = new Uri($"https://localhost:7256/api/regions/{request.Id}"),
                Content = new StringContent(JsonSerializer.Serialize(request), Encoding.UTF8, "application/json")
            };

            var httpResponseMessage = await client.SendAsync(httpRequestMessage);
            httpResponseMessage.EnsureSuccessStatusCode();

            var respose = await httpResponseMessage.Content.ReadFromJsonAsync&lt;RegionDto>();

            if (respose is not null)
            {
                return RedirectToAction("Edit", "Regions");
            }

            return View();
        }

        [HttpPost]
        public async Task&lt;IActionResult> Delete(RegionDto request)
        {
            try 
            {
                var client = httpClientFactory.CreateClient();

                var httpResponseMessage = await client.DeleteAsync($"https://localhost:7256/api/regions/{request.Id}");
                httpResponseMessage.EnsureSuccessStatusCode();

                return RedirectToAction("Index", "Regions");

            }
            catch (Exception ex) 
            { 
            
            }

            return View("Edit");
        }

    }
}
</pre>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1214" height="479" src="https://lycos7560.com/wp-content/uploads/2024/10/image-205.png" alt="" class="wp-image-38640" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-205.png 1214w, https://lycos7560.com/wp-content/uploads/2024/10/image-205-300x118.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-205-768x303.png 768w" sizes="(max-width: 1214px) 100vw, 1214px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="557" height="315" src="https://lycos7560.com/wp-content/uploads/2024/10/image-206.png" alt="" class="wp-image-38641" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-206.png 557w, https://lycos7560.com/wp-content/uploads/2024/10/image-206-300x170.png 300w" sizes="(max-width: 557px) 100vw, 557px" /></figure>
</div>
</div>



<p></p>
<p>The post <a href="https://lycos7560.com/c/consuming-rest-web-apis/38585/">Consuming REST Web APIs</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/c/consuming-rest-web-apis/38585/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
