Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
laurivosandi committed Oct 5, 2024
1 parent 27f272a commit b27c736
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 3 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: ci

on:
push:
branches:
- "main"

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64,linux/armhf
push: true
tags: ${{ github.repository }}:latest
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*.o
*.lo
*.la
*.1
.libs
.deps
*.log
Makefile
config.h
config.status
docs/Makefile
esd-config
esddsp
esound.pc
esound.spec
libtool
stamp-h1
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM alpine AS build
RUN apk add alpine-sdk libtool alsa-lib-dev audiofile-dev linux-headers
ADD . .
RUN ./configure
RUN make install

FROM alpine
RUN apk add audiofile alsa-utils
COPY --from=build /usr/local/ /usr/local/
RUN ldd /usr/local/bin/esd
6 changes: 3 additions & 3 deletions esddsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,12 +688,12 @@ mmap (void *start, size_t length, int prot, int flags, int fd, off_t offset)
}

void *
mmap64 (void *start, size_t length, int prot, int flags, int fd, off64_t offset)
mmap64 (void *start, size_t length, int prot, int flags, int fd, off_t offset)
{
static void *(*func) (void *, size_t, int, int, int, off64_t) = NULL;
static void *(*func) (void *, size_t, int, int, int, off_t) = NULL;

if (!func)
func = (void * (*) (void *, size_t, int, int, int, off64_t)) dlsym (REAL_LIBC, "mmap64");
func = (void * (*) (void *, size_t, int, int, int, off_t)) dlsym (REAL_LIBC, "mmap64");

if(fd != sndfd || sndfd == -1)
return (*func)(start,length,prot,flags,fd,offset);
Expand Down

0 comments on commit b27c736

Please sign in to comment.