Skip to content

Commit

Permalink
chore: add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
xJonathanLEI committed Mar 4, 2024
1 parent 789203f commit e9a28f1
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/target/
/.dockerignore
/Dockerfile
19 changes: 19 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
push:
branches:
- "master"
pull_request:

name: "Build"

jobs:
build-docker:
name: "Build Docker image"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout source code"
uses: "actions/checkout@v3"

- name: "Build Docker image"
run: |
docker build .
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM rust:alpine AS build

RUN apk add --update alpine-sdk

COPY . /src
WORKDIR /src

RUN cargo build --release

FROM alpine

LABEL org.opencontainers.image.source=https://github.com/xJonathanLEI/starkli

COPY --from=build /src/target/release/starkli /usr/bin/

ENTRYPOINT [ "starkli" ]

0 comments on commit e9a28f1

Please sign in to comment.