mirror of
				https://github.com/byReqz/ssh-chat-docker.git
				synced 2025-11-04 02:31:30 +00:00 
			
		
		
		
	Fix build
This commit is contained in:
		
							
								
								
									
										22
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								Dockerfile
									
									
									
									
									
								
							@@ -1,25 +1,15 @@
 | 
			
		||||
FROM golang:latest
 | 
			
		||||
FROM debian:latest
 | 
			
		||||
 | 
			
		||||
RUN apt-get update && apt-get clean
 | 
			
		||||
RUN apt-get install jq -y && apt-get clean
 | 
			
		||||
 | 
			
		||||
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
 | 
			
		||||
 | 
			
		||||
RUN wget -O release.tar.gz $(curl https://api.github.com/repos/shazow/ssh-chat/releases | jq .[0].zipball_url | sed -e s/\"//g -e s/zipball/tarball/g)
 | 
			
		||||
 | 
			
		||||
RUN tar xvfz release.tar.gz && \
 | 
			
		||||
    mv shazow-ssh-chat-* /go/src/ssh-chat
 | 
			
		||||
 | 
			
		||||
RUN cd /go/src/ssh-chat/ && \
 | 
			
		||||
    export GOPATH=/go && \
 | 
			
		||||
    make && \
 | 
			
		||||
    go build ./cmd/ssh-chat/
 | 
			
		||||
RUN apt-get update
 | 
			
		||||
RUN apt-get install -y curl jq
 | 
			
		||||
RUN curl -s https://api.github.com/repos/shazow/ssh-chat/releases/latest | jq -r '.assets[].browser_download_url' | grep "ssh-chat-linux_amd64.tgz" | xargs curl -L -o ssh-chat-linux_amd64.tgz
 | 
			
		||||
RUN tar xvfz ssh-chat-linux_amd64.tgz
 | 
			
		||||
 | 
			
		||||
FROM debian:latest
 | 
			
		||||
 | 
			
		||||
COPY entrypoint.sh /entrypoint.sh
 | 
			
		||||
RUN chmod +x /entrypoint.sh
 | 
			
		||||
 | 
			
		||||
COPY --from=0 /go/src/ssh-chat/ssh-chat /ssh-chat
 | 
			
		||||
COPY --from=0 /ssh-chat/ssh-chat /ssh-chat
 | 
			
		||||
 | 
			
		||||
ENTRYPOINT ["/entrypoint.sh"]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user