Based on alpine, as much as possible smallest image to run mojolicious, a web framework in Perl
2.0K
Docker-mojolicious is a minimum components to run Mojolicious, a real-time web framework and web development toolkit written in Perl.
All images, unless explicitly defined, are based on alpine:3.20 and provide installed together with these Perl modules:
docker-mojolicious: 2.0, latest (main/Dockerfile) (size: 56.2MB)
docker-mojolicious: 2.0-minion, minion (minion/Dockerfile) (size: 60.3MB) based on alpine:3.20 with these additional Perl modules
docker-mojolicious: 2.0-mysql, mysql (mysql/Dockerfile) (size: 89.9MB) based on alpine:3.20 with these additional Perl modules
docker-mojolicious: 2.0-minion-mongodb, minion-mongodb (minion-mongodb/Dockerfile) (size: 65.4MB) based on alpine:3.20 with these additional Perl modules
docker-mojolicious: 2.0-mongodb, mongodb (mongodb/Dockerfile) (size: 61.2MB) based on alpine:3.20 with these additional Perl modules
Go to your code folder, call Mojolicious to create the basic application structure with you as the owner.
$ docker container run --rm -v "$(pwd):/usr/src/app" ebruni/mojolicious mojo generate app MyApp
Start the application as daemon.
$ cd my_app
$ docker container run -d --rm -v "$(pwd):/usr/src/app" -p 3000:3000 ebruni/mojolicious morbo script/my_app
To run the container in the foreground and read the output, omit the -d and add -ti
$ docker container run --rm -ti -v "$(pwd):/usr/src/app" -p 3000:3000 ebruni/mojolicious morbo script/my_app
Browse to localhost:3000 and edit the code in the current folder. If you are on Linux or MacOS, the server will restart whenever you change a file. On Windows this works if you use Docker Desktop with WSL 2.
To switch from development to production an run the application as daemon in the full featured non-blocking web server start it with
$ docker container run -d --rm -v "$(pwd):/usr/src/app" -p 3000:3000 ebruni/mojolicious script/my_app prefork
Emiliano Bruni (EB) [email protected]
| AUTHOR | DATE | VER. | COMMENTS |
|---|---|---|---|
| EB | 2024-10-29 | 2.0 | Updated to alpine 3.20. Mojolicious to v. 9.38 |
| EB | 2022-07-07 | 1.6 | Add DBIC/mysql client support. Add tini package. |
| EB | 2022-06-07 | 1.5 | Update to Mojolicious v. 9.26 |
| EB | 2022-02-24 | 1.4 | Update to Mojolicious v. 9.22 |
| EB | 2021-09-09 | 1.3 | Add tags for Mojolicious::Plugin::Mongodbv2. |
| EB | 2021-09-09 | 1.2 | Removed Minion::Backend::MongoDB. |
| EB | 2021-09-07 | 1.1 | Update Minion::Backend::MongoDB to latest version. |
| EB | 2021-08-23 | 1.0 | Initial Version. |
The source of this image on GitHub.
Content type
Image
Digest
sha256:bd340ad0b…
Size
17.4 MB
Last updated
almost 2 years ago
docker pull ebruni/mojolicious