mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
docs: update 'Use OpenTofu as Docker Image' documentation (#1705)
Signed-off-by: eduardo <eduardoslafiq@gmail.com>
This commit is contained in:
parent
2d72c90de1
commit
3fdc809050
@ -32,6 +32,17 @@ To pull platform-specific images (`amd64`, `arm`, `arm64`, `386`) use:
|
||||
|
||||
## Usage
|
||||
|
||||
:::note
|
||||
If you run into rate limiting issues with GitHub, create a
|
||||
[Personal Access Token](https://github.com/settings/tokens) and
|
||||
[log in](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry)
|
||||
to the registry.
|
||||
:::
|
||||
|
||||
:::note
|
||||
In the examples below you should have at least one `.tf` file located in the folder you are running the `docker` command.
|
||||
:::
|
||||
|
||||
To pull the image from GitHub Packages registry:
|
||||
|
||||
<CodeBlock language="bash">{DockerPullScript}</CodeBlock>
|
||||
@ -39,12 +50,3 @@ To pull the image from GitHub Packages registry:
|
||||
To run OpenTofu as a Docker container:
|
||||
|
||||
<CodeBlock language="bash">{DockerRunScript}</CodeBlock>
|
||||
|
||||
:::tip
|
||||
|
||||
If you run into rate limiting issues with GitHub, create a
|
||||
[Personal Access Token](https://github.com/settings/tokens) and
|
||||
[log in](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry)
|
||||
to the registry.
|
||||
|
||||
:::
|
||||
|
@ -1,5 +1,20 @@
|
||||
# Init providers plugins
|
||||
docker run \
|
||||
--workdir=/srv/workspace \
|
||||
--mount type=bind,source=.,target=/srv/workspace \
|
||||
ghcr.io/opentofu/opentofu:latest \
|
||||
init
|
||||
|
||||
# Creating plan file
|
||||
docker run \
|
||||
--workdir=/srv/workspace \
|
||||
--mount type=bind,source=.,target=/srv/workspace \
|
||||
ghcr.io/opentofu/opentofu:latest \
|
||||
plan -out=main.plan
|
||||
|
||||
# Applying plan file
|
||||
docker run \
|
||||
--workdir=/srv/workspace \
|
||||
--mount type=bind,source=.,target=/srv/workspace \
|
||||
ghcr.io/opentofu/opentofu:latest \
|
||||
apply "/srv/workspace/main.plan"
|
Loading…
Reference in New Issue
Block a user