Skip to content

Adds a dockerfile to build and run cedar-lean-cli.#644

Merged
chaluli merged 3 commits into
cedar-policy:mainfrom
chaluli:main
Jun 24, 2025
Merged

Adds a dockerfile to build and run cedar-lean-cli.#644
chaluli merged 3 commits into
cedar-policy:mainfrom
chaluli:main

Conversation

@chaluli

@chaluli chaluli commented Jun 23, 2025

Copy link
Copy Markdown

This PR addresses issue #635 by adding a new Dockerfile that creates a docker image that pre-installs cedar-lean-cli and all of its dependencies.

To build:

cd cedar-lean-cli
docker build -t cedar-lean-cli -f ./Dockerfile ..

Create and enter a container running the newly created docker image:

docker run -it cedar-lean-cli

chaluli added 2 commits June 23, 2025 21:05
…ructions accordingly.

Signed-off-by: Charlie Murphy <mutmoth@amazon.com>
Signed-off-by: Charlie Murphy <mutmoth@amazon.com>
Signed-off-by: Charlie Murphy <mutmoth@amazon.com>
Comment thread cedar-lean-cli/Dockerfile
Comment on lines +35 to +36
FROM prepare AS build

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this have any effect, given that prepare was the immediately preceding layer?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. I copied this from an existing DockerFile.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread cedar-lean-cli/README.md
```
# Create a docker image that is identified with the tag "cedar-lean-cli"
cd cedar-lean-cli # Enter the cedar-lean-cli directory
docker build -t cedar-lean-cli -f ./Dockerfile ..

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think -f ./Dockerfile is the default?

@chaluli chaluli Jun 24, 2025

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe so.

I believe the default behavior is to look for Dockerfile within the build context (..) and not the current working directory (.).

Comment thread cedar-lean-cli/README.md
docker build -t cedar-lean-cli -f ./Dockerfile ..

# Create and enter a container using the newly created cedar-lean-cli docker image
docker run -it cedar-lean-cli

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

possibly recommend --rm

@chaluli chaluli merged commit ed49d55 into cedar-policy:main Jun 24, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants