Added docker stuff
This commit is contained in:
parent
0ec6159365
commit
33aa3d0ae7
3 changed files with 41 additions and 1 deletions
22
.github/workflows/build.yml
vendored
Normal file
22
.github/workflows/build.yml
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
name: Build & Publish Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Login to Registry
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.DOCKER_PASSWD }}" | docker login \
|
||||||
|
docker.tensamin.net \
|
||||||
|
-u "${{ secrets.DOCKER_USER }}" \
|
||||||
|
--password-stdin
|
||||||
|
|
||||||
|
- name: Build and Push
|
||||||
|
run: |
|
||||||
|
docker build -t docker.tensamin.net/iota:latest .
|
||||||
|
docker push docker.tensamin.net/iota:latest
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "Iota"
|
name = "iota"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
|
|
|
||||||
18
dockerfile
Normal file
18
dockerfile
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Build stage
|
||||||
|
FROM rust:latest AS builder
|
||||||
|
|
||||||
|
WORKDIR .
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN cargo build --release
|
||||||
|
|
||||||
|
# Runtime stage
|
||||||
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY --from=builder /target/release/iota /usr/local/bin/
|
||||||
|
|
||||||
|
EXPOSE 1984
|
||||||
|
|
||||||
|
CMD ["iota"]
|
||||||
Loading…
Reference in a new issue