瀏覽代碼

Generate a static Linux executable within an Alpine linux container

default_compile_flags
vector-of-bool 4 年之前
父節點
當前提交
3830fe556b
共有 2 個文件被更改,包括 24 次插入1 次删除
  1. +11
    -1
      Makefile
  2. +13
    -0
      tools/Dockerfile.alpine

+ 11
- 1
Makefile 查看文件

@@ -2,7 +2,7 @@

.PHONY: \
docs docs-server docs-watch docs-sync-server nix-ci linux-ci macos-ci \
vagrant-freebsd-ci site
vagrant-freebsd-ci site alpine-static-ci

_invalid:
echo "Specify a target name to execute"
@@ -55,6 +55,16 @@ nix-ci:
-B download \
-T tools/gcc-9-rel.jsonc

alpine-static-ci:
docker build -t dds-builder -f tools/Dockerfile.alpine tools/
docker run \
-ti --rm \
-u $(shell id -u) \
-v $(PWD):/host -w /host \
--privileged \
dds-builder \
make linux-ci

vagrant-freebsd-ci:
vagrant up freebsd11
vagrant rsync

+ 13
- 0
tools/Dockerfile.alpine 查看文件

@@ -0,0 +1,13 @@
FROM alpine:3.12.1

# Base build dependencies
RUN apk add "gcc=9.3.0-r2" "g++=9.3.0-r2" make python3 py3-pip \
git openssl-libs-static openssl-dev

# We use version-qualified names for compiler executables
RUN ln -s $(type -P gcc) /usr/local/bin/gcc-9 && \
ln -s $(type -P g++) /usr/local/bin/g++-9

# Some Python test dependencies
RUN python3 -m pip install pytest pytest-xdist \
pytest-asyncio semver typing-extensions

Loading…
取消
儲存