Skip to content

make docker command does not track _sass or html files in the project root #415

@ckingbailey

Description

@ckingbailey

The Jekyll development server will rebuild on changes to files, but the docker run command in the Makefile does not bind-mount the _sass folder or any html files that are in the project root (such as index.html).

I tried mounting the _sass folder (-v "$(PWD)/_sass:/app/_sass") and it works as expected. However, I have been unsuccessful in getting the Jekyll server running in the Docker container to rebuild on changes when index.html is mounted (-v "$(PWD)/index.html:/app/index.html"). I found this SO thread that says you have to touch any individual files you want to mount in the Docker container before mounting them. I tried that, adding RUN touch index.html in the Dockerfile. It didn't work for me.

Others have tried the above and it works for them. Here's a Gist that includes a line to mount index.html. This code does not work on my system. Note that the additions in the Gist did not require adding touch index.html to the Dockerfile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions