Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
docker:
Expand Down Expand Up @@ -32,8 +35,8 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm
push: true
platforms: linux/arm64,linux/arm/v6
push: ${{ github.ref == 'refs/heads/master' }}
tags: texthtml/midi-synthesizer-autoconnect:latest
cache-from: type=gha
cache-to: type=gha,mode=max
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM rust:1.54-bullseye AS builder
FROM alpine AS builder

WORKDIR /app
RUN apk add cargo --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/

RUN apk add alsa-lib-dev

RUN apt-get update && apt-get install -y libasound2-dev
WORKDIR /app

ADD .cargo /app/.cargo/
ADD Cargo.toml Cargo.lock .cargo /app/
Expand All @@ -16,11 +18,9 @@ ADD src /app/src/
RUN touch src/main.rs && \
cargo build --release --offline

FROM debian:bullseye
FROM alpine

RUN apt-get update && \
apt-get install -y libasound2 && \
rm -rf /var/lib/apt/lists/*
RUN apk add --no-cache libgcc alsa-lib

COPY --from=builder /app/target/release/midi-synthesizer-autoconnect /usr/bin/

Expand Down