Update index.html
Browse files- index.html +44 -38
index.html
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<html lang="en">
|
3 |
<head>
|
4 |
<meta charset="UTF-8" />
|
5 |
-
<title>Intro to Containers Fact or Fiction</title>
|
6 |
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
7 |
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;600&display=swap" rel="stylesheet">
|
8 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
@@ -69,23 +69,23 @@
|
|
69 |
</head>
|
70 |
<body>
|
71 |
<h1>Intro to Containers Fact or Fiction</h1>
|
72 |
-
<div id="subtitle">Test your knowledge of Containers, Docker, and Kubernetes</div>
|
73 |
<div id="source-link">
|
74 |
Source: <a href="https://www.linkedin.com/pulse/introduction-containers-docker-kubernetes-michael-lively-5c1be/" target="_blank" rel="noopener">
|
75 |
Introduction to Containers, Docker, and Kubernetes (LinkedIn)
|
76 |
</a>
|
77 |
</div>
|
78 |
|
79 |
-
<div id="game-container">
|
80 |
-
<div class="progress-container"><div class="progress-bar" id="progress-bar"></div></div>
|
81 |
-
<div id="statement">Loading statement...</div>
|
82 |
|
83 |
<div class="btn-group">
|
84 |
-
<button onclick="guess(true)">Fact</button>
|
85 |
-
<button class="secondary" onclick="guess(false)">Fiction</button>
|
86 |
</div>
|
87 |
|
88 |
-
<div id="result"></div>
|
89 |
<div id="explanation"></div>
|
90 |
|
91 |
<div id="controls">
|
@@ -93,74 +93,74 @@
|
|
93 |
<button id="restart-btn" style="display:none;" onclick="startGame()">Restart</button>
|
94 |
</div>
|
95 |
|
96 |
-
<div id="score"></div>
|
97 |
</div>
|
98 |
|
99 |
<script>
|
100 |
-
// 12 statements (6 Fact, 6 Fiction)
|
101 |
const statements = [
|
102 |
-
// FACTS (6)
|
103 |
{
|
104 |
-
text: "Containers share the host
|
105 |
isFact: true,
|
106 |
-
explanation: "Fact. Containers virtualize the OS
|
107 |
},
|
108 |
{
|
109 |
-
text: "Docker’s 2013 release popularized containerization by standardizing images and registries.",
|
110 |
isFact: true,
|
111 |
-
explanation: "Fact. Docker
|
112 |
},
|
113 |
{
|
114 |
-
text: "Kubernetes
|
115 |
isFact: true,
|
116 |
-
explanation: "Fact.
|
117 |
},
|
118 |
{
|
119 |
-
text: "
|
120 |
isFact: true,
|
121 |
-
explanation: "Fact.
|
122 |
},
|
123 |
{
|
124 |
-
text: "
|
125 |
isFact: true,
|
126 |
-
explanation: "Fact.
|
127 |
},
|
128 |
{
|
129 |
-
text: "
|
130 |
isFact: true,
|
131 |
-
explanation: "Fact.
|
132 |
},
|
133 |
|
134 |
-
// FICTIONS (6)
|
135 |
{
|
136 |
-
text: "Containers always include a
|
137 |
isFact: false,
|
138 |
-
explanation: "Fiction.
|
139 |
},
|
140 |
{
|
141 |
-
text: "
|
142 |
isFact: false,
|
143 |
-
explanation: "Fiction.
|
144 |
},
|
145 |
{
|
146 |
-
text: "
|
147 |
isFact: false,
|
148 |
-
explanation: "Fiction.
|
149 |
},
|
150 |
{
|
151 |
-
text: "
|
152 |
isFact: false,
|
153 |
-
explanation: "Fiction.
|
154 |
},
|
155 |
{
|
156 |
-
text: "
|
157 |
isFact: false,
|
158 |
-
explanation: "Fiction.
|
159 |
},
|
160 |
{
|
161 |
-
text: "
|
162 |
isFact: false,
|
163 |
-
explanation: "Fiction.
|
164 |
}
|
165 |
];
|
166 |
|
@@ -185,7 +185,10 @@
|
|
185 |
if (currentIndex >= statements.length) return endGame();
|
186 |
const s = statements[currentIndex];
|
187 |
document.getElementById('statement').textContent = s.text;
|
188 |
-
document.getElementById('result')
|
|
|
|
|
|
|
189 |
document.getElementById('explanation').style.display = 'none';
|
190 |
document.getElementById('next-btn').style.display = 'none';
|
191 |
answered = false; updateProgress();
|
@@ -196,6 +199,7 @@
|
|
196 |
answered = true;
|
197 |
const correct = statements[currentIndex].isFact;
|
198 |
const resultEl = document.getElementById('result');
|
|
|
199 |
if (isFactGuess === correct) {
|
200 |
resultEl.textContent = 'Correct!';
|
201 |
resultEl.className = 'correct';
|
@@ -205,6 +209,7 @@
|
|
205 |
resultEl.className = 'incorrect';
|
206 |
}
|
207 |
resultEl.style.display = 'block';
|
|
|
208 |
const expEl = document.getElementById('explanation');
|
209 |
expEl.textContent = statements[currentIndex].explanation + " (See source link above.)";
|
210 |
expEl.style.display = 'block';
|
@@ -223,7 +228,8 @@
|
|
223 |
}
|
224 |
|
225 |
function updateProgress() {
|
226 |
-
|
|
|
227 |
}
|
228 |
|
229 |
function endGame() {
|
|
|
2 |
<html lang="en">
|
3 |
<head>
|
4 |
<meta charset="UTF-8" />
|
5 |
+
<title>Intro to Containers Fact or Fiction (2025)</title>
|
6 |
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
7 |
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;600&display=swap" rel="stylesheet">
|
8 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
69 |
</head>
|
70 |
<body>
|
71 |
<h1>Intro to Containers Fact or Fiction</h1>
|
72 |
+
<div id="subtitle">Test your 2025 knowledge of Containers, Docker, and Kubernetes</div>
|
73 |
<div id="source-link">
|
74 |
Source: <a href="https://www.linkedin.com/pulse/introduction-containers-docker-kubernetes-michael-lively-5c1be/" target="_blank" rel="noopener">
|
75 |
Introduction to Containers, Docker, and Kubernetes (LinkedIn)
|
76 |
</a>
|
77 |
</div>
|
78 |
|
79 |
+
<div id="game-container" role="region" aria-label="Fact or Fiction game">
|
80 |
+
<div class="progress-container" aria-hidden="true"><div class="progress-bar" id="progress-bar"></div></div>
|
81 |
+
<div id="statement" aria-live="polite">Loading statement...</div>
|
82 |
|
83 |
<div class="btn-group">
|
84 |
+
<button onclick="guess(true)" aria-label="Choose Fact">Fact</button>
|
85 |
+
<button class="secondary" onclick="guess(false)" aria-label="Choose Fiction">Fiction</button>
|
86 |
</div>
|
87 |
|
88 |
+
<div id="result" role="status" aria-live="polite"></div>
|
89 |
<div id="explanation"></div>
|
90 |
|
91 |
<div id="controls">
|
|
|
93 |
<button id="restart-btn" style="display:none;" onclick="startGame()">Restart</button>
|
94 |
</div>
|
95 |
|
96 |
+
<div id="score" aria-live="polite"></div>
|
97 |
</div>
|
98 |
|
99 |
<script>
|
100 |
+
// 12 statements (6 Fact, 6 Fiction) reflecting 2025 realities
|
101 |
const statements = [
|
102 |
+
// ===== FACTS (6) =====
|
103 |
{
|
104 |
+
text: "Containers share the host operating system kernel instead of bundling a full guest OS.",
|
105 |
isFact: true,
|
106 |
+
explanation: "Fact. Containers virtualize at the OS layer, which keeps them lightweight and fast to start."
|
107 |
},
|
108 |
{
|
109 |
+
text: "Docker’s 2013 release popularized containerization by standardizing images and registries for developers.",
|
110 |
isFact: true,
|
111 |
+
explanation: "Fact. Docker democratized packaging and distribution via images and registries."
|
112 |
},
|
113 |
{
|
114 |
+
text: "Kubernetes (introduced in 2014) is the de facto standard for orchestrating containers at scale.",
|
115 |
isFact: true,
|
116 |
+
explanation: "Fact. K8s handles scheduling, scaling, rollouts, and self-healing across clusters."
|
117 |
},
|
118 |
{
|
119 |
+
text: "Modern Kubernetes clusters run with OCI-compatible runtimes like containerd or CRI-O, not Docker Engine.",
|
120 |
isFact: true,
|
121 |
+
explanation: "Fact. Dockershim was removed; K8s uses CRI runtimes such as containerd/CRI-O."
|
122 |
},
|
123 |
{
|
124 |
+
text: "OCI standards improve interoperability for images and artifacts, including SBOMs and signatures.",
|
125 |
isFact: true,
|
126 |
+
explanation: "Fact. OCI Image/Artifact specs let registries store images, SBOMs, and signatures consistently."
|
127 |
},
|
128 |
{
|
129 |
+
text: "Rootless options like Podman, plus strong policies and signing (e.g., cosign), are common 2025 security practices.",
|
130 |
isFact: true,
|
131 |
+
explanation: "Fact. Least privilege, rootless, SBOMs, and signing are part of modern supply-chain security."
|
132 |
},
|
133 |
|
134 |
+
// ===== FICTIONS (6) =====
|
135 |
{
|
136 |
+
text: "Containers always include a complete guest operating system, just like virtual machines.",
|
137 |
isFact: false,
|
138 |
+
explanation: "Fiction. Containers share the host kernel; VMs package a full OS per instance."
|
139 |
},
|
140 |
{
|
141 |
+
text: "Kubernetes is itself a container runtime, so you don’t need containerd or CRI-O anymore.",
|
142 |
isFact: false,
|
143 |
+
explanation: "Fiction. Kubernetes is an orchestrator and relies on a CRI-compatible runtime underneath."
|
144 |
},
|
145 |
{
|
146 |
+
text: "In 2025, Docker Engine is the default runtime under Kubernetes for production clusters.",
|
147 |
isFact: false,
|
148 |
+
explanation: "Fiction. Since the dockershim removal, production K8s uses containerd or CRI-O."
|
149 |
},
|
150 |
{
|
151 |
+
text: "OpenTelemetry has fully replaced all observability tools and is already a graduated CNCF project.",
|
152 |
isFact: false,
|
153 |
+
explanation: "Fiction. OTel is the de facto standard for telemetry formats, but it has not replaced all tools and has not historically been fully graduated."
|
154 |
},
|
155 |
{
|
156 |
+
text: "WebAssembly (Wasm) has completely replaced containers for cloud workloads.",
|
157 |
isFact: false,
|
158 |
+
explanation: "Fiction. Wasm is growing and complementary; it hasn’t replaced containers."
|
159 |
},
|
160 |
{
|
161 |
+
text: "Containers are a poor fit for hybrid or multi-cloud because they lack portability.",
|
162 |
isFact: false,
|
163 |
+
explanation: "Fiction. Portability is one of containers’ biggest strengths across on-prem, cloud, and edge."
|
164 |
}
|
165 |
];
|
166 |
|
|
|
185 |
if (currentIndex >= statements.length) return endGame();
|
186 |
const s = statements[currentIndex];
|
187 |
document.getElementById('statement').textContent = s.text;
|
188 |
+
const resultEl = document.getElementById('result');
|
189 |
+
resultEl.style.display = 'none';
|
190 |
+
resultEl.textContent = '';
|
191 |
+
resultEl.className = '';
|
192 |
document.getElementById('explanation').style.display = 'none';
|
193 |
document.getElementById('next-btn').style.display = 'none';
|
194 |
answered = false; updateProgress();
|
|
|
199 |
answered = true;
|
200 |
const correct = statements[currentIndex].isFact;
|
201 |
const resultEl = document.getElementById('result');
|
202 |
+
|
203 |
if (isFactGuess === correct) {
|
204 |
resultEl.textContent = 'Correct!';
|
205 |
resultEl.className = 'correct';
|
|
|
209 |
resultEl.className = 'incorrect';
|
210 |
}
|
211 |
resultEl.style.display = 'block';
|
212 |
+
|
213 |
const expEl = document.getElementById('explanation');
|
214 |
expEl.textContent = statements[currentIndex].explanation + " (See source link above.)";
|
215 |
expEl.style.display = 'block';
|
|
|
228 |
}
|
229 |
|
230 |
function updateProgress() {
|
231 |
+
const pct = Math.round((currentIndex / statements.length) * 100);
|
232 |
+
document.getElementById('progress-bar').style.width = pct + '%';
|
233 |
}
|
234 |
|
235 |
function endGame() {
|