-
Notifications
You must be signed in to change notification settings - Fork 10
add docker #124
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
Open
MarketMadi
wants to merge
7
commits into
civkit:main
Choose a base branch
from
MarketMadi:add-docker
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
add docker #124
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b3d7d95
add docker
MarketMadi 7e21f2f
added commands to readme.md
MarketMadi 1dbb5d3
Updated Dockerfile, README, and util.rs for Docker support
MarketMadi c4ccf55
editing debug.log
MarketMadi a70193f
Stop tracking debug.log
MarketMadi 64b7653
Update .gitignore to ignore log files
MarketMadi 82ec174
copying to release , only compile civkitd
MarketMadi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,5 @@ | |
| # will have compiled files and executables | ||
| /target/ | ||
| Cargo.lock | ||
| debug.log | ||
| debug.log | ||
| *.log | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Stage 1: Building the binary | ||
| FROM rust:latest as builder | ||
|
|
||
| # Install protobuf compiler | ||
| RUN apt-get update && apt-get install -y protobuf-compiler | ||
|
|
||
| # Set the working directory in the Docker image | ||
| WORKDIR /usr/src/civkit-node | ||
|
|
||
| # Copy the source code into the Docker image | ||
| COPY . . | ||
|
|
||
| # Build the application | ||
| RUN cargo build --release --bin=civkitd | ||
|
|
||
| # Stage 2: Setup the runtime environment | ||
| FROM ubuntu:latest | ||
|
|
||
| # Install runtime dependencies | ||
| # Including CA certificates | ||
| RUN apt-get update && apt-get install -y libsqlite3-0 libssl-dev ca-certificates && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Copy the binaries from the builder stage | ||
| COPY --from=builder /usr/src/civkit-node/target/release/civkitd /usr/local/bin/civkitd | ||
|
|
||
| # Expose ports | ||
| EXPOSE 50031 | ||
| EXPOSE 9735 | ||
| EXPOSE 50021 | ||
| EXPOSE 18443 | ||
|
|
||
| # Set the default command to run the main binary | ||
| CMD ["civkitd"] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -103,3 +103,4 @@ impl Default for Config { | |
| } | ||
| } | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are compiling only the "civkitd" binary as well, so we should only copy that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i left them thinking they could be useful for debugging / development purposes. i think we should do what you propose, keep it lean.