portfolio-template / Dockerfile
adowu's picture
Deploy from GitHub via GH -> HF Deployer
7c88a7e verified
Raw
History Blame Contribute Delete
661 Bytes
# Auto-generated by GH -> HF Spaces Deployer
FROM nginx:alpine
RUN apk add --no-cache git ca-certificates && update-ca-certificates
# Clone the source repository at build time.
RUN git clone --depth 1 --branch master https://github.com/alec-chernicki/portfolio-template.git /tmp/site && \
rm -rf /usr/share/nginx/html/* && \
cp -r /tmp/site/* /usr/share/nginx/html/ && \
rm -rf /tmp/site
# HF Spaces require listening on port 7860.
RUN sed -i 's/listen\s*80;/listen 7860;/g' /etc/nginx/conf.d/default.conf && \
sed -i 's/listen\s*\[::\]:80;/listen [::]:7860;/g' /etc/nginx/conf.d/default.conf
EXPOSE 7860
CMD ["nginx", "-g", "daemon off;"]