Skip to content

Commit bff753b

Browse files
committed
Add solution for Day 2 - Rust
1 parent 621f2de commit bff753b

File tree

9 files changed

+2770
-0
lines changed

9 files changed

+2770
-0
lines changed

2022/2/Cargo.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[package]
2+
name = "aoc_rust_2022_2"
3+
version = "1.0.0"
4+
authors = ["https://github.com/Garcel"]
5+
edition = "2021"
6+
7+
[[bench]]
8+
name = "bench"
9+
path = "src/bench.rs"
10+
harness = false

2022/2/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM rust:latest
2+
3+
ENV CARGO_HOME=/usr/.cargo
4+
5+
WORKDIR /usr/src/aoc_rust_2022
6+
7+
COPY . .
8+
9+
RUN chmod 777 .
10+
11+
# Add a new user non root user
12+
RUN adduser docker_user --disabled-password --gecos ""
13+
14+
# Change to non-root privilege
15+
USER docker_user
16+
17+
CMD cargo test && cargo bench

2022/2/input/demo.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
A Y
2+
B X
3+
C Z

0 commit comments

Comments
 (0)