Skip to content

Commit 8ded3c6

Browse files
author
ynn
committed
chore: adds support for Docker
1 parent 0bae80f commit 8ded3c6

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
.*
33
*.pdf
44
test_images/
5-
Dockerfile
65
*.png
76
*.jpg
87
*.gif

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM alpine:3.22
2+
3+
RUN apk add curl
4+
RUN apk add alpine-sdk
5+
6+
RUN adduser -D user
7+
USER user
8+
9+
#installs Rust
10+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
11+
ENV PATH="/home/user/.cargo/bin:${PATH}"
12+
RUN rustup install 1.90 && rustup default 1.90
13+
14+
WORKDIR /home/user/app
15+
COPY --chown=user . .
16+
RUN cargo install --locked --path .
17+
18+
ENTRYPOINT ["piet_programming_language"]

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ $ cd piet_programming_language/
2020
$ cargo run -- --help
2121
```
2222

23+
Or if you prefer Docker:
24+
25+
```bash
26+
$ git clone 'https://github.com/your-diary/piet_programming_language'
27+
$ cd piet_programming_language/
28+
$ docker build -t piet_programming_language .
29+
$ docker run --rm piet_programming_language --help
30+
$ docker run --rm -it piet_programming_language --base64 "$(base64 ./path/to/image.png)"
31+
```
32+
2333
### 2.2 Installation
2434

2535
MSRV(Minimum Supported Rust Version): [Rust 1.87.0](https://www.rust-lang.org/tools/install)

0 commit comments

Comments
 (0)