-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 405a1df
Showing
9 changed files
with
1,956 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,28 @@ | ||
FROM debian:bullseye-slim AS builder | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
curl \ | ||
&& apt-get clean | ||
|
||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ | ||
sh -s -- -y --default-toolchain nightly | ||
|
||
FROM debian:bullseye-slim | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
gnupg2 \ | ||
build-essential \ | ||
pkg-config \ | ||
libssl-dev \ | ||
&& apt-get clean | ||
|
||
# Copy Rust toolchain from the builder stage | ||
COPY --from=builder /root/.cargo /root/.cargo | ||
COPY --from=builder /root/.rustup /root/.rustup | ||
|
||
# Set PATH for Rust | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
|
||
# Confirm installation by showing the Rust version | ||
RUN rustc --version |
This file contains 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 @@ | ||
{ | ||
"name": "Rust Dev Container", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"workspaceFolder": "/workspace", | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/bash", | ||
"todo-tree.regex.regex": "(//|#|<!--|;|/\\*|^|^[ \\t]*(-|\\d+.))\\s*($TAGS)|todo!", | ||
"todo-tree.filtering.excludeGlobs": [ | ||
"**/.git/**", | ||
"**/.devcontainer/**" | ||
] | ||
}, | ||
"extensions": [ | ||
"rust-lang.rust-analyzer", | ||
"vadimcn.vscode-lldb", | ||
"tamasfe.even-better-toml", | ||
"fill-labs.dependi", | ||
"usernamehw.errorlens", | ||
"Gruntfuggly.todo-tree", | ||
"ms-azuretools.vscode-docker" | ||
] | ||
} | ||
}, | ||
"postCreateCommand": "cargo install --path .", | ||
"forwardPorts": [], | ||
"remoteUser": "root", | ||
"mounts": [ | ||
"source=${localWorkspaceFolder},target=/workspace/,type=bind" | ||
] | ||
} |
This file contains 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,33 @@ | ||
name: Publish Docker Image to GHCR | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Log in to GHCR | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GHCR_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and tag Docker image | ||
run: | | ||
docker build -t ghcr.io/${{ github.repository }}:latest . | ||
- name: Push Docker image to GHCR | ||
run: | | ||
docker push ghcr.io/${{ github.repository }}:latest |
This file contains 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,21 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
|
||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries | ||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html | ||
#Cargo.lock | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
# RustRover | ||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
.idea/ |
Oops, something went wrong.