You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			26 lines
		
	
	
		
			746 B
		
	
	
	
		
			Docker
		
	
			
		
		
	
	
			26 lines
		
	
	
		
			746 B
		
	
	
	
		
			Docker
		
	
| FROM golang:alpine AS lib_builder
 | |
| 
 | |
| WORKDIR /foundry
 | |
| 
 | |
| RUN apk add git make linux-headers cmake g++
 | |
| RUN git clone https://github.com/jgarff/rpi_ws281x.git \
 | |
|   && cd rpi_ws281x \ 
 | |
|   && mkdir build \
 | |
|   && cd build \ 
 | |
|   && cmake -D BUILD_SHARED=OFF -D BUILD_TEST=OFF .. \
 | |
|   && cmake --build . \
 | |
|   && make install
 | |
| 
 | |
| # Stage 1 : Build a go image with the rpi_ws281x C library and the go wrapper
 | |
| 
 | |
| FROM golang:alpine
 | |
| COPY --from=lib_builder /usr/local/lib/libws2811.a /usr/local/lib/
 | |
| COPY --from=lib_builder /usr/local/include/ws2811 /usr/local/include/ws2811
 | |
| RUN apk add git make linux-headers cmake g++
 | |
| WORKDIR /go/src/github.com/rpi-ws281x/rpi-ws281x-go
 | |
| COPY . .
 | |
| RUN GO111MODULE=off go get -d -v ./...
 | |
| RUN GO111MODULE=off go build -v ./...
 | |
| 
 | |
| WORKDIR /go
 |