HUB
Sign inSign up
middleman logo

kineticdata/middleman

By kineticdata

•Updated over 8 years ago

Run a website with the Middleman web server.

Image
0

349

kineticdata/middleman repository overview

⁠Docker image for building/running middleman projects

This docker image is used for building or running middleman⁠ projects.

In order for middleman-livereload to work, be sure to set the livereload host and js_host properties in the application config.rb file:

activate :livereload do |reload|
  reload.host = '0.0.0.0'
  reload.js_host = '0.0.0.0'
end

The commands listed below assume you are mapping your current working directory on your host machine to the /app directory on the running docker container.

⁠Mapping docker volume

The image is setup to serve the application from the /app directory on the running container. You can map this directory to the Middleman application directory on your host machine using the -v command line option.

⁠Running a Middleman Website

To install all the dependencies and run the project:

First change to the project directory:

cd /usr/share/my-www-project

Then start the middleman server:

docker run \
  -p 4567:4567 \
  -p 35729:35729 \
  -v "$(PWD)":/app \
  kineticdata/middleman \
  bash -c "bundle install && middleman server"

The website will be running at http://localhost:4567⁠.

Any changes you make to your project files on the host machine should automatically reload on the container's middleman server. If you add or change any gems in your project, you will need to start a new docker container to install the gems.

⁠Building a Middleman Website

To install all the dependencies and build the project:

First change to the project directory:

cd /usr/share/my-www-project

Then tell middleman to build the project:

docker run \
  -v "$(PWD)":/app \
  kineticdata/middleman \
  bash -c "bundle install && middleman build"
Tag summary
Recent tags
Content type
Image
Digest
Size
100.7 MB
Last updated
over 8 years ago
docker pull kineticdata/middleman:latest