0
0
Svelteframework~5 mins

Docker deployment in Svelte - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is Docker in simple terms?
Docker is like a shipping container for software. It packages your app and everything it needs so it runs the same anywhere.
Click to reveal answer
beginner
Why use Docker for deploying a Svelte app?
Docker makes sure your Svelte app runs the same on your computer and on any server, avoiding "it works on my machine" problems.
Click to reveal answer
beginner
What is a Dockerfile?
A Dockerfile is a simple text file with instructions to build a Docker image. It tells Docker how to prepare your app's container.
Click to reveal answer
intermediate
In Docker deployment, what is an image vs a container?
An image is a blueprint with your app and setup. A container is a running instance of that image, like a live copy.
Click to reveal answer
intermediate
How do you expose your Svelte app's port in Docker?
You use the EXPOSE command in the Dockerfile and map the port when running the container with -p, so the app is reachable.
Click to reveal answer
What command builds a Docker image from a Dockerfile?
Adocker build
Bdocker run
Cdocker start
Ddocker push
Which file typically contains instructions to create a Docker image for a Svelte app?
ADockerfile
Bpackage.json
Csvelte.config.js
Dindex.html
How do you make your Svelte app accessible outside the Docker container?
ARun npm start inside the container
BAdd a script in package.json
CUse a different framework
DUse EXPOSE in Dockerfile and map ports with -p
What does the command 'docker run -p 5000:5000 my-svelte-app' do?
ADeletes the Docker image
BRuns the container and maps port 5000 inside to port 5000 outside
CStops the running container
DBuilds the Docker image
Why is Docker helpful for beginners deploying Svelte apps?
AIt replaces the need for HTML
BIt hides all code details
CIt ensures the app runs the same everywhere
DIt automatically writes your app
Explain how you would create a Dockerfile to deploy a Svelte app.
Think about the steps to prepare and run your app inside a container.
You got /6 concepts.
    Describe the difference between a Docker image and a Docker container in your own words.
    Compare it to a cake recipe versus a baked cake.
    You got /3 concepts.