Compare commits
6 Commits
958856dcc0
...
feature/do
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d22c99c84 | |||
| ad980feee1 | |||
| 1b8b8269c6 | |||
| afe400036a | |||
| 4d545ff7c5 | |||
| 98e11b9da1 |
@@ -1 +1,6 @@
|
|||||||
**
|
**
|
||||||
|
!src
|
||||||
|
!Cargo.toml
|
||||||
|
!Cargo.lock
|
||||||
|
!flake.nix
|
||||||
|
!flake.lock
|
||||||
|
|||||||
23
.github/workflows/docker.yml
vendored
Normal file
23
.github/workflows/docker.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
name: Docker
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main", "feature/docker"]
|
||||||
|
pull_request:
|
||||||
|
branches: ["main"]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: hustcer/setup-nu@v3
|
||||||
|
|
||||||
|
- name: Get Cargo version
|
||||||
|
run: version=$(nu -c "cargo metadata --format-version=1 --no-deps | from json | get packages | first | get version")
|
||||||
|
- name: Build docker image
|
||||||
|
run: docker build -t docki:$version .
|
||||||
14
Dockerfile
14
Dockerfile
@@ -1,7 +1,11 @@
|
|||||||
FROM rust:slim
|
FROM nixos/nix AS build
|
||||||
|
|
||||||
WORKDIR /opt/rust
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
RUN nix --extra-experimental-features nix-command --extra-experimental-features flakes build \
|
||||||
|
&& nix --extra-experimental-features nix-command --extra-experimental-features flakes store gc
|
||||||
|
|
||||||
|
RUN mkdir /out && cp result/bin/docki .
|
||||||
|
|
||||||
RUN apt update \
|
|
||||||
&& apt-get -y upgrade \
|
|
||||||
&& apt-get -y install libssl-dev pkg-config
|
|
||||||
|
|||||||
Reference in New Issue
Block a user