mirror of
				https://gitea.com/gitea/tea.git
				synced 2025-11-04 11:15:26 +01:00 
			
		
		
		
	- `make build` + `make install` now support the `STATIC=true` parameter, creating statically linked builds that are also position independent executables - this requires CGO and a static libc on the build system - `CGO_ENABLED=0` is set for all make build targets, unless `STATIC=true` is set - Debug symbols are stripped (`-s -w`) for all make build targets - Release binaries are built statically by gox (no PIE), as before. I also took the liberty to declutter the makefile from unused & duplicated variables. Co-authored-by: Norwin Roosen <git@nroo.de> Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/349 Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: Norwin <noerw@noreply.gitea.io> Co-committed-by: Norwin <noerw@noreply.gitea.io>
		
			
				
	
	
		
			26 lines
		
	
	
		
			696 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			696 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
ARG GOVERSION="1.16.2"
 | 
						|
 | 
						|
FROM golang:${GOVERSION}-alpine AS buildenv
 | 
						|
 | 
						|
ARG GOOS="linux"
 | 
						|
 | 
						|
COPY . $GOPATH/src/
 | 
						|
WORKDIR $GOPATH/src
 | 
						|
 | 
						|
RUN	apk add --quiet --no-cache \
 | 
						|
		build-base \
 | 
						|
		make \
 | 
						|
		git && \
 | 
						|
	make clean build STATIC=true
 | 
						|
 | 
						|
FROM scratch
 | 
						|
ARG VERSION="0.7.0"
 | 
						|
LABEL org.opencontainers.image.title="tea - CLI for Gitea - git with a cup of tea"
 | 
						|
LABEL org.opencontainers.image.description="A command line tool to interact with Gitea servers"
 | 
						|
LABEL org.opencontainers.image.version="${VERSION}"
 | 
						|
LABEL org.opencontainers.image.authors="Tamás Gérczei <tamas@gerczei.eu>"
 | 
						|
LABEL org.opencontainers.image.vendor="The Gitea Authors"
 | 
						|
COPY --from=buildenv /go/src/tea /
 | 
						|
ENV HOME="/app"
 | 
						|
ENTRYPOINT ["/tea"]
 |