-
I should say I'm not a web developer but Quarto has been very easy to follow. In my organization I created a website where I want to track some documentation for a variety of projects and make it available. I was able to publish this internally in a container where the last command in the Dockerfile is
It works but I'm not sure this is the correct way to do it. I thought maybe the correct way would be to run
and then serve the site somehow. After running the above I understand this creates an output
However, I'm not sure what the correct next command would be. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
You only need to have a web server and the produced website/document from Quarto. FROM nginx:latest
COPY mysite /mysite
RUN apt-get update \
&& apt-get -y install wget ca-certificates \
&& wget "https://github.com/quarto-dev/quarto-cli/releases/download/v1.0.38/quarto-1.0.38-linux-amd64.deb" -O quarto.deb \
&& dpkg -i quarto.deb \
&& rm quarto.deb \
&& apt-get autoremove -y \
&& apt-get autoclean -y \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/*
RUN quarto render /mysite --output-dir /usr/share/nginx/html
EXPOSE 80 quarto create-project mysite --type website
docker buildx build --platform linux/amd64 --tag docker-quarto-image .
docker container run --platform linux/amd64 --name docker-quarto --detach --port 8000:80 docker-quarto-image |
Beta Was this translation helpful? Give feedback.
-
Note: If the use case is preview (changes to the source code will also update the preview), such a command could be used. quarto preview --host 0.0.0.0 --port 3838 --no-browser Without the The use case is this. |
Beta Was this translation helpful? Give feedback.
-
FYI: https://mickael.canouil.fr/posts/2023-05-07-quarto-docker/ |
Beta Was this translation helpful? Give feedback.
-
@mcanouil what about getting 404 pages to work within Docker running locally?
So the 404 page is found when the site is served at |
Beta Was this translation helpful? Give feedback.
You only need to have a web server and the produced website/document from Quarto.
Something like below:
quarto create-project mysite --type website docker buildx build --platform linux/amd64 --tag docker-quarto-image . docker container …