This repository offers a starting point of running mint in Docker. It uses Docker Compose so you should have it installed.
The default scaffolded application is located in the workspace
folder and it's used as a starting point.
If you only want to use Docker check the end of this readme.
This repository makes use of a Makefile to achieve short commands.
Run make
or make server
to start a development server:
$ make
docker-compose run --rm --service-ports mint start --host 0.0.0.0
Mint - Running the development server
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Ensuring dependencies... 130μs
⚙ Parsing files... 20.682ms
⚙ Development server started on http://0.0.0.0:3000/
Run make build
to build the final files into the workspace/dist
folder:
$ make build
docker-compose run --rm mint build
Mint - Building for production
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Ensuring dependencies... 0μs
⚙ Clearing the "dist" directory... 376μs
⚙ Compiling your application:
➔ Parsing 4 source files... 17.345ms
➔ Type checking: 22.129ms
➔ Compiling: 2.541ms
⚙ Writing external stylesheets...165μs
⚙ Writing index.html... 587μs
⚙ Writing manifest.webmanifest...140μs
⚙ Generating icons... 363.919ms
⚙ Creating service worker...1.079ms
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
All done in 2.274s!
Run make format
to format all source files:
$ make format
docker-compose run --rm mint format
Mint - Formatting files
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
All files are formatted!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
All done in 41.795ms!
Run make install
to install any dependencies you added:
$ make install
docker-compose run --rm mint install
Mint - Installing dependencies
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
There are no dependencies!
There is nothing to do!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
All done in 119μs!
You can use plain Docker to achieve the same commands above.
You will need to pull the latest image:
$ docker pull ghcr.io/mint-lang/mint
If you are on windows you need to change $(pwd)/workspace
to the absolute path of the workspace
folder.
To run the development server run the following command:
docker run --tty -v $(pwd)/workspace:/workspace -w /workspace -p 3000:3000 --rm -ti mint start -h 0.0.0.0
To create a build run:
docker run --tty -v $(pwd)/workspace:/workspace -w /workspace --rm -ti mint build
To format files run:
docker run --tty -v $(pwd)/workspace:/workspace -w /workspace --rm -ti mint format
To install dependencies run:
docker run --tty -v $(pwd)/workspace:/workspace -w /workspace --rm -ti mint install