The Registry is a stateless, highly scalable server side application that stores and lets you distribute Docker images. The Registry is open-source, under the permissive Apache license.
docker stop {container_id|conatinaer_name}
docker kill {container_id|conatinaer_name}
타입의 프로퍼티가 같으면 디스크리미네이티드 유니언 타입으로 쓸 수 있다.
type SuccessState = {
result: "success"; // 동일한 result라는 key의 type은 문자열인 'success'와 'fail'을 준다.
response: {
body: string;
};
};
type FailState = {
result: "fail";
reason: string;
};
type LoginState = SuccessState | FailState;
function printLoginState(state: LoginState): void {
// state 즉 LoginState 타입에는 result는 success든 fail이든 다 들어있어서 result를 바로 보여준다.
if (state.result === "success") {
console.log(`🎉 ${state.response.body}`);
} else {
console.log(`😭 ${state.reason}`);
}