chore(lander): fix Docker build
							parent
							
								
									6af3e6ad6d
								
							
						
					
					
						commit
						29f4edc059
					
				|  | @ -1,4 +1,15 @@ | ||||||
| data/ | * | ||||||
| build/ | 
 | ||||||
| trie/build/ | !src/ | ||||||
| .git/ | !include/ | ||||||
|  | 
 | ||||||
|  | !lsm/src/ | ||||||
|  | !lsm/include/ | ||||||
|  | !lsm/Makefile | ||||||
|  | !lsm/config.mk | ||||||
|  | 
 | ||||||
|  | !thirdparty/include | ||||||
|  | !thirdparty/src | ||||||
|  | 
 | ||||||
|  | !Makefile | ||||||
|  | !config.mk | ||||||
|  |  | ||||||
							
								
								
									
										13
									
								
								Dockerfile
								
								
								
								
							
							
						
						
									
										13
									
								
								Dockerfile
								
								
								
								
							|  | @ -1,11 +1,12 @@ | ||||||
| FROM alpine:3.18.0 AS builder | FROM ubuntu:23.10 AS builder | ||||||
| 
 | 
 | ||||||
| ARG DI_VER=1.2.5 | ARG DI_VER=1.2.5 | ||||||
| 
 | 
 | ||||||
| RUN apk add --update --no-cache \ | RUN apt update && \ | ||||||
|     build-base \ |     apt install -y --no-install-recommends \ | ||||||
|     make \ |         curl ca-certificates \ | ||||||
|     curl |         build-essential \ | ||||||
|  |         musl musl-dev musl-tools | ||||||
| 
 | 
 | ||||||
| WORKDIR /app | WORKDIR /app | ||||||
| 
 | 
 | ||||||
|  | @ -18,7 +19,7 @@ RUN curl -Lo - "https://github.com/Yelp/dumb-init/archive/refs/tags/v${DI_VER}.t | ||||||
| 
 | 
 | ||||||
| COPY . ./ | COPY . ./ | ||||||
| 
 | 
 | ||||||
| RUN make CFLAGS='-O3' LDFLAGS='-static -flto' && \ | RUN make CFLAGS='-O3' LDFLAGS='-flto -static' && \ | ||||||
|     strip build/lander && \ |     strip build/lander && \ | ||||||
|     readelf -d build/lander && \ |     readelf -d build/lander && \ | ||||||
|     [ "$(readelf -d build/lander | grep NEEDED | wc -l)" = 0 ] |     [ "$(readelf -d build/lander | grep NEEDED | wc -l)" = 0 ] | ||||||
|  |  | ||||||
							
								
								
									
										12
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										12
									
								
								Makefile
								
								
								
								
							|  | @ -35,15 +35,11 @@ all: $(BIN) | ||||||
| .PHONY: objs | .PHONY: objs | ||||||
| objs: $(OBJS) | objs: $(OBJS) | ||||||
| 
 | 
 | ||||||
| .PHONY: libtrie |  | ||||||
| libtrie: |  | ||||||
| 	$(MAKE) -C trie |  | ||||||
| 
 |  | ||||||
| .PHONY: liblsm | .PHONY: liblsm | ||||||
| liblsm: | liblsm: | ||||||
| 	$(MAKE) -C lsm | 	$(MAKE) -C lsm | ||||||
| 
 | 
 | ||||||
| $(BIN): libtrie liblsm $(OBJS) | $(BIN): liblsm $(OBJS) | ||||||
| 	$(CC) -o $@ $(OBJS) $(_LDFLAGS) | 	$(CC) -o $@ $(OBJS) $(_LDFLAGS) | ||||||
| 
 | 
 | ||||||
| $(BUILD_DIR)/$(SRC_DIR)/%.c.o: $(SRC_DIR)/%.c | $(BUILD_DIR)/$(SRC_DIR)/%.c.o: $(SRC_DIR)/%.c | ||||||
|  | @ -126,12 +122,14 @@ check: | ||||||
| 		--enable=warning,style \
 | 		--enable=warning,style \
 | ||||||
| 		-ithirdparty/* \
 | 		-ithirdparty/* \
 | ||||||
| 		-itrie/* \
 | 		-itrie/* \
 | ||||||
| 		--quiet | 		--inline-suppr \
 | ||||||
|  | 		--check-level=exhaustive \
 | ||||||
|  | 		--quiet \
 | ||||||
|  | 		-j$(shell nproc) | ||||||
| 
 | 
 | ||||||
| .PHONY: clean | .PHONY: clean | ||||||
| clean: | clean: | ||||||
| 	rm -rf $(BUILD_DIR) | 	rm -rf $(BUILD_DIR) | ||||||
| 	$(MAKE) -C trie clean |  | ||||||
| 	$(MAKE) -C lsm clean | 	$(MAKE) -C lsm clean | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -8,8 +8,8 @@ TEST_DIR       = test | ||||||
| THIRDPARTY_DIR = thirdparty | THIRDPARTY_DIR = thirdparty | ||||||
| 
 | 
 | ||||||
| INC_DIRS  = include $(THIRDPARTY_DIR)/include trie/include lsm/include | INC_DIRS  = include $(THIRDPARTY_DIR)/include trie/include lsm/include | ||||||
| LIBS      = trie m lsm | LIBS      = m lsm | ||||||
| LIB_DIRS  = ./trie/build  ./lsm/build | LIB_DIRS  = ./lsm/build | ||||||
| 
 | 
 | ||||||
| # -MMD: generate a .d file for every source file. This file can be imported by
 | # -MMD: generate a .d file for every source file. This file can be imported by
 | ||||||
| #  make and makes make aware that a header file has been changed, ensuring an
 | #  make and makes make aware that a header file has been changed, ensuring an
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue