From 96bc391e8580067a3317ea136bc236173bf4b598 Mon Sep 17 00:00:00 2001 From: Amir Mohammadi Date: Wed, 28 Dec 2022 19:08:51 +0330 Subject: [PATCH] Add Dockerfile --- Dockerfile | 13 +++++++++++++ README.md | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..67f4d6e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM rust:alpine as builder + +RUN apk add --no-cache build-base openssl-dev + +WORKDIR /app/x8 +COPY Cargo.toml Cargo.lock ./ +COPY src/ src/ + +RUN cargo build --release + +FROM alpine:3.12 +COPY --from=builder /app/x8/target/release/x8 /usr/local/bin/x8 +ENTRYPOINT [ "x8" ] diff --git a/README.md b/README.md index b6d3416..66d398b 100644 --- a/README.md +++ b/README.md @@ -279,3 +279,10 @@ And a new terminal window with the running tool should open. - Windows - from releases + +- Docker + ```bash + git clone https://github.com/Sh1Yo/x8 + cd x8 + docker build -t x8 . + ```