Files
taco-blog/Dockerfile
taco 3f12dbccd0
Some checks failed
Build and Publish Docker Image / build (push) Failing after 7s
add submodule init
2026-05-13 21:47:45 +00:00

28 lines
499 B
Docker

# Stage 1
FROM alpine:latest AS build
# Install the Hugo go app.
RUN apk add --update hugo
WORKDIR /opt/HugoApp
# Copy Hugo config into the container Workdir.
COPY . .
RUN git submodule update --init --recursive
# Run Hugo in the Workdir to generate HTML.
RUN hugo
# Stage 2
FROM nginx:1.25-alpine
# Set workdir to the NGINX default dir.
WORKDIR /usr/share/nginx/html
# Copy HTML from previous build into the Workdir.
COPY --from=build /opt/HugoApp/public .
# Expose port 80
EXPOSE 80/tcp