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

add docker support for cdk-mintd #480

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

aki-mizu
Copy link

Description


This PR adds Docker support for cdk-mintd #455

Notes to the reviewers


This would make deployment of cdk-mintd easier.

ADDED

Dockerfile


Checklist

@aki-mizu aki-mizu changed the title add docker support add docker support for cdk-mintd Nov 29, 2024
Copy link
Contributor

@Jeezman Jeezman left a comment

Choose a reason for hiding this comment

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

 Building 539.8s (12/13)                                                                                                                                            docker:orbstack
 => [internal] load build definition from Dockerfile                                                                                                                              0.1s
 => => transferring dockerfile: 1.34kB                                                                                                                                            0.0s
 => [internal] load metadata for docker.io/library/ubuntu:24.04                                                                                                                   2.5s
 => [auth] library/ubuntu:pull token for registry-1.docker.io                                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                                                                 0.0s
 => => transferring context: 2B                                                                                                                                                   0.0s
 => [1/8] FROM docker.io/library/ubuntu:24.04@sha256:278628f08d4979fb9af9ead44277dbc9c92c2465922310916ad0c46ec9999295                                                             0.0s
 => [internal] load build context                                                                                                                                                81.6s
 => => transferring context: 13.61GB                                                                                                                                             78.7s
 => CACHED [2/8] WORKDIR /usr/src/app                                                                                                                                             0.0s
 => [3/8] RUN apt-get update && apt-get install -y     curl     protobuf-compiler     xz-utils                                                                                   61.1s
 => [4/8] COPY . /usr/src/app                                                                                                                                                   195.8s
 => [5/8] RUN mkdir -m 0755 /nix && chown root /nix                                                                                                                               0.4s
 => [6/8] RUN groupadd -g 30000 nixbld &&     for i in $(seq 1 10); do         useradd -u $((30000 + i)) -g nixbld -G nixbld -m -s /bin/false nixbld$i;     done                  0.4s

Thanks for working on this.
While testing I noticed the size of docker image is quite on the high side, ~ 26GB.

Copy link
Contributor

@Jeezman Jeezman left a comment

Choose a reason for hiding this comment

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

2024-11-29T18:13:01.505442Z  WARN cdk_mintd::config: Error reading config file (configuration file "/root/.cdk-mintd/config.toml" not found)
Error: error returned from database: (code: 14) unable to open database file

Got this error while trying to run the image

done

# Install Nix and set up the environment
RUN curl -L https://nixos.org/nix/install | sh -s -- --daemon && \
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious as to why nix is needed

Copy link
Author

@aki-mizu aki-mizu Nov 29, 2024

Choose a reason for hiding this comment

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

Based on description from https://github.com/aki-mizu/cdk/tree/main/crates/cdk-mintd
In order to build from source, running nix develop is necessary.

@aki-mizu
Copy link
Author

2024-11-29T18:13:01.505442Z  WARN cdk_mintd::config: Error reading config file (configuration file "/root/.cdk-mintd/config.toml" not found)
Error: error returned from database: (code: 14) unable to open database file

Got this error while trying to run the image

config.toml file needs to be provided externally.
If you're using docker-compose.yml, you can provide it via volumes like this:
volumes: - ./config.toml:/root/.cdk-mintd/config.toml

@Jeezman
Copy link
Contributor

Jeezman commented Nov 29, 2024

2024-11-29T18:13:01.505442Z  WARN cdk_mintd::config: Error reading config file (configuration file "/root/.cdk-mintd/config.toml" not found)
Error: error returned from database: (code: 14) unable to open database file

Got this error while trying to run the image

config.toml file needs to be provided externally. If you're using docker-compose.yml, you can provide it via volumes like this: volumes: - ./config.toml:/root/.cdk-mintd/config.toml

Got it. Probably needs a documentation

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.

2 participants