Merge pull request #34112 from sftim/20220602_skip_container_image_build
Avoid recommending a local container image build
This commit is contained in:
@@ -77,7 +77,7 @@ container-push: container-image ## Push container image for the preview of the w
|
|||||||
container-build: module-check
|
container-build: module-check
|
||||||
$(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 $(CONTAINER_IMAGE) sh -c "npm ci && hugo --minify --environment development"
|
$(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 $(CONTAINER_IMAGE) sh -c "npm ci && hugo --minify --environment development"
|
||||||
|
|
||||||
container-serve: module-check ## Boot the development server using container. Run `make container-image` before this.
|
container-serve: module-check ## Boot the development server using container.
|
||||||
$(CONTAINER_RUN) --cap-drop=ALL --cap-add=AUDIT_WRITE --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --environment development --bind 0.0.0.0 --destination /tmp/hugo --cleanDestinationDir
|
$(CONTAINER_RUN) --cap-drop=ALL --cap-add=AUDIT_WRITE --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --environment development --bind 0.0.0.0 --destination /tmp/hugo --cleanDestinationDir
|
||||||
|
|
||||||
test-examples:
|
test-examples:
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ git submodule update --init --recursive --depth 1
|
|||||||
|
|
||||||
## Running the website using a container
|
## Running the website using a container
|
||||||
|
|
||||||
To build the site in a container, run the following to build the container image and run it:
|
To build the site in a container, run the following:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make container-image
|
# You can set $CONTAINER_ENGINE to the name of any Docker-like container tool
|
||||||
make container-serve
|
make container-serve
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -292,34 +292,24 @@ You can either build the website's container image or run Hugo locally. Building
|
|||||||
The commands below use Docker as default container engine. Set the `CONTAINER_ENGINE` environment variable to override this behaviour.
|
The commands below use Docker as default container engine. Set the `CONTAINER_ENGINE` environment variable to override this behaviour.
|
||||||
{{< /note >}}
|
{{< /note >}}
|
||||||
|
|
||||||
1. Build the image locally:
|
1. Build the container image locally
|
||||||
|
_You only need this step if you are testing a change to the Hugo tool itself_
|
||||||
|
```bash
|
||||||
|
# Run this in a terminal (if required)
|
||||||
|
make container-image
|
||||||
|
```
|
||||||
|
|
||||||
```bash
|
1. Start Hugo in a container:
|
||||||
# Use docker (default)
|
|
||||||
make container-image
|
|
||||||
|
|
||||||
### OR ###
|
```bash
|
||||||
|
# Run this in a terminal
|
||||||
|
make container-serve
|
||||||
|
```
|
||||||
|
|
||||||
# Use podman
|
1. In a web browser, navigate to `https://localhost:1313`. Hugo watches the
|
||||||
CONTAINER_ENGINE=podman make container-image
|
|
||||||
```
|
|
||||||
|
|
||||||
2. After building the `kubernetes-hugo` image locally, build and serve the site:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Use docker (default)
|
|
||||||
make container-serve
|
|
||||||
|
|
||||||
### OR ###
|
|
||||||
|
|
||||||
# Use podman
|
|
||||||
CONTAINER_ENGINE=podman make container-serve
|
|
||||||
```
|
|
||||||
|
|
||||||
3. In a web browser, navigate to `https://localhost:1313`. Hugo watches the
|
|
||||||
changes and rebuilds the site as needed.
|
changes and rebuilds the site as needed.
|
||||||
|
|
||||||
4. To stop the local Hugo instance, go back to the terminal and type `Ctrl+C`,
|
1. To stop the local Hugo instance, go back to the terminal and type `Ctrl+C`,
|
||||||
or close the terminal window.
|
or close the terminal window.
|
||||||
|
|
||||||
{{% /tab %}}
|
{{% /tab %}}
|
||||||
|
|||||||
Reference in New Issue
Block a user