Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Dockerfile and make docker command added #239

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Use floryn90/hugo:ext-alpine as the base image
FROM floryn90/hugo:ext-alpine
FROM razonyang/hugo:exts as builder

# Set the working directory to /src
WORKDIR /src
ARG HUGO_BASEURL=
ENV HUGO_BASEURL=${HUGO_BASEURL}

# Install Git and configure safe directory
RUN apk add --no-cache git && \
git config --global --add safe.directory /src
COPY . /src
RUN hugo --minify --gc --enableGitInfo

FROM razonyang/hugo:nginx
COPY --from=builder /src/public /site
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@ clean:
check-go:
@echo "Checking if Go is installed..."
@command -v go > /dev/null || (echo "Go is not installed. Please install it before proceeding."; exit 1)
@echo "Go is installed."
@echo "Go is installed."

docker:
docker build -t layer5/docs .
docker run -p 8080:80 layer5/docs
10 changes: 0 additions & 10 deletions docker-compose.yaml

This file was deleted.

Loading