build docker image for static binary

This commit is contained in:
SANO Masatoshi 2021-05-14 01:42:51 +09:00
parent 2c591300a4
commit 806a1606de
3 changed files with 35 additions and 0 deletions

27
.github/workflows/docker-build.yml vendored Normal file
View file

@ -0,0 +1,27 @@
name: docker-build
on:
workflow_dispatch:
env:
DOCKER_BUILDKIT: 1
jobs:
build:
runs-on: ubuntu-latest
environment: DOCKER_IMAGE
steps:
- uses: actions/checkout@v2
- name: Login GitHub Registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com -u snmsts --password-stdin
- name: Build image
env:
IMAGE: ${{ secrets.IMAGE }}
run: |
echo building $(cat ./scripts/Docker/$IMAGE/Name) ...
docker build -t docker.pkg.github.com/${{ github.repository }}/$(cat ./scripts/Docker/$IMAGE/Name) ./scripts/Docker/${IMAGE}
- name: Push image to GitHub Registry
env:
IMAGE: ${{ secrets.IMAGE }}
run: docker push docker.pkg.github.com/${{ github.repository }}/$(cat ./scripts/Docker/$IMAGE_DIR/Name)

View file

@ -0,0 +1,7 @@
FROM alpine:3.13
run apk add --no-cache \
alpine-sdk automake autoconf curl-dev bash linux-headers \
curl-static nghttp2-static openssl-libs-static brotli-static zlib-static; \
cd /tmp/roswell;./bootstrap;./configure --with-sbcl-bin-variant='-musl';make; make install; \
ros install sbcl-bin/2.0.5; \
rm -rf /tmp/roswell

View file

@ -0,0 +1 @@
roswell-musl:64