I try to create nanoc Markdown Documentation page deployment using docker.
Docker container was created successfully.
While running the container i am getting the nanoc configuration error and container stopped.
I have mentioned the steps followed for implementation.
Followed Steps
Step 1
Docker file
FROM ruby:latest
# Create app directory
WORKDIR /usr/src/app
COPY Gemfile .
# Copy the files
COPY . ./docs
RUN bundler install
RUN apt update
# Start the development/staging server
EXPOSE 3000
CMD ["bundler","exec","nanoc","view" ]
Step 2
docker build -t nanoc:latest .
Step 3
docker run -p 0.0.0.0:3000:3000 --name nanoc-latest -t -d nanoc:latest
Docker Logs container ID
Docker file update:
FROM ruby:2.3
RUN mkdir -p /user/src/app
COPY . /usr/src/app
WORKDIR /usr/src/app/docs
RUN bundle install
RUN bundle exec nanoc
EXPOSE 3000
CMD bundle exec nanoc view
This configuration will sole the above error.