mirror of
				https://gitea.com/gitea/act_runner.git
				synced 2025-10-26 10:30:40 +01:00 
			
		
		
		
	This issue  is caused by the addition of validation logic for `Host` in `http.Request` in golang 1.20.6 (see https://go-review.googlesource.com/c/go/+/507357/6/src/net/http/request.go)
In `act`, when execute `ContainerExecAttach()`(see 22d91e3ac3/pkg/container/docker_run.go (L594)), the actual value of `request.Host` is `"/var/run/docker.sock"`. This does not conform to the specification described in `validhostHeader`.
 <details> <summary>ValidHostHeader()</summary>

</details>
So this PR follow upstream: https://github.com/nektos/act/pull/1917 and revert https://gitea.com/gitea/act_runner/pulls/295
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/319
Reviewed-by: Jason Song <i@wolfogre.com>
Co-authored-by: sillyguodong <gedong_1994@163.com>
Co-committed-by: sillyguodong <gedong_1994@163.com>
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			474 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			474 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
| FROM golang:1.20-alpine3.18 as builder
 | |
| # Do not remove `git` here, it is required for getting runner version when executing `make build`
 | |
| RUN apk add --no-cache make git
 | |
| 
 | |
| COPY . /opt/src/act_runner
 | |
| WORKDIR /opt/src/act_runner
 | |
| 
 | |
| RUN make clean && make build
 | |
| 
 | |
| FROM alpine:3.18
 | |
| RUN apk add --no-cache git bash tini
 | |
| 
 | |
| COPY --from=builder /opt/src/act_runner/act_runner /usr/local/bin/act_runner
 | |
| COPY scripts/run.sh /opt/act/run.sh
 | |
| 
 | |
| ENTRYPOINT ["/sbin/tini","--","/opt/act/run.sh"]
 |