mirror of
https://gitea.tendokyu.moe/self/even
synced 2024-11-12 01:40:50 +01:00
build: add docker build
This commit is contained in:
parent
221ff55200
commit
0b1ae35fec
15
.dockerignore
Normal file
15
.dockerignore
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
|
||||
!/README.md
|
||||
!/COPYING
|
||||
!/Makefile
|
||||
|
||||
!/.editorconfig
|
||||
!/.clang-format
|
||||
|
||||
!/peru.yaml
|
||||
!/third_party/
|
||||
|
||||
!/*.c
|
||||
!/*.h
|
||||
!/*.rc
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,8 @@
|
||||
compile_commands.json
|
||||
.peru/
|
||||
|
||||
dist/
|
||||
|
||||
### C ###
|
||||
# Prerequisites
|
||||
*.d
|
||||
|
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
FROM alpine:latest AS xbuild
|
||||
|
||||
RUN apk add --no-cache make mingw-w64-gcc
|
||||
|
||||
WORKDIR /build
|
||||
COPY . .
|
||||
|
||||
ARG VERSION
|
||||
RUN make VERSION="${VERSION}"
|
||||
|
||||
FROM scratch
|
||||
COPY --from=xbuild /build/even.sys /build/even.pdb /
|
11
Makefile
11
Makefile
@ -34,7 +34,7 @@ LDFLAGS += $(KRNLIBS)
|
||||
|
||||
.SUFFIXES: .sys
|
||||
|
||||
.PHONY: clean third_party
|
||||
.PHONY: clean third_party docker dist
|
||||
|
||||
all: even.sys
|
||||
|
||||
@ -56,3 +56,12 @@ third_party: .peru/lastimports
|
||||
|
||||
.peru/lastimports: peru.yaml
|
||||
peru sync || :
|
||||
|
||||
dist/:
|
||||
mkdir -p $@
|
||||
|
||||
docker: Dockerfile .dockerignore dist/
|
||||
docker build -t even --build-arg VERSION="$(VERSION)" .
|
||||
docker create --name even-build even
|
||||
docker export even-build | tar x -C dist
|
||||
docker rm -f even-build
|
||||
|
Loading…
Reference in New Issue
Block a user