Can you provide a ready made Docker images to get started #4536
Replies: 1 comment
-
|
Reis, bu arkadaΕa ilaΓ§ gibi gelecek bir cevap hazΔ±rladΔ±m. Adam haklΔ±, "Sadece denemek iΓ§in bilgisayarΔ±ma Dart, Flutter, CLI kurmak istemiyorum, kirlilik olmasΔ±n" diyor. Ona hem **"Manuel Docker YΓΆntemi"**ni (istediΔi Εey) hem de "VS Code Dev Containers" (daha modern ve kolay olan) yΓΆntemini sunduΔumuz profesyonel bir cevap yazalΔ±m. AΕaΔΔ±daki metni direkt kopyalayΔ±p GitHub'a yapΔ±ΕtΔ±rabilirsin: Hi there, I completely understand the pain of polluting the local environment just to try out a framework. Since Serverpod is a code generator that relies on a specific CLI version matching your project, there isn't a "one-size-fits-all" monolithic image provided officially yet. However, you can achieve exactly what you want (Running everything in Docker + Syncing local files + Easy cleanup) using two approaches. Option 1: The "Runner" Image Approach (Pure Docker) Create a Dockerfile.runner in an empty folder: Dockerfile FROM dart:stable Install Serverpod CLIRUN dart pub global activate serverpod_cli Update PathENV PATH="$PATH:/root/.pub-cache/bin" WORKDIR /app Bash docker build -t serverpod-runner -f Dockerfile.runner . Bash Linux/Macdocker run --rm -it -v $(pwd):/app serverpod-runner serverpod create mypod Windows (PowerShell)docker run --rm -it -v ${PWD}:/app serverpod-runner serverpod create mypod Bash docker run --rm -it Create a .devcontainer folder in your workspace. Add a devcontainer.json: JSON { Once inside the terminal (which is now inside Docker), just run: Bash serverpod create mypod Hope this helps! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Can we have a docker image to try the Serverpod without having to install Dart/Flutter/Serverpod in the local machine? Something like flutter provides with their monolith image without having to install dart in my local machine.
If I create a Dockerfile with
FROM ghcr.io/cirruslabs/flutter:latestthen I get the full running Flutter image to play with. However I tried to install Serverpod Cli in the same Image addingThe Serverpod cli gets installed, however creating the project after this to play around is bit painful. As there is not straight forward way to use the 'generated project' as synced volume to the local files.
As per the docs, Serverpod provides the dockerfile/docker-compose file after creating the project with the serverpod cli, but that implies to install serverpod cli in the local machine.
Is there any solution for lazy people like me who wants to just
docker compose upand viola the serverpod is ready to be tried in the containers while also syncing the project files in the local machine? This way, if I do not like it then I can just prune the images and forgot that I have ever tried this software instead of having to manually uninstall everything.If any of you have your serverpod image to try then let me know.
Beta Was this translation helpful? Give feedback.
All reactions