update to build appropriately
build lightwatch / build (push) Failing after 3h9m25s Details

main
Nathan Wagner 2 days ago
parent e59deb0427
commit 42e03a2ca7

@ -0,0 +1,22 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
"name": "Debian",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
}
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

@ -2,25 +2,31 @@ FROM golang:alpine AS lib_builder
WORKDIR /foundry WORKDIR /foundry
RUN apk add git make linux-headers cmake g++ # install build deps (use build-base to get gcc/g++)
RUN apk add --no-cache git build-base linux-headers cmake
RUN git clone https://github.com/jgarff/rpi_ws281x.git \ RUN git clone https://github.com/jgarff/rpi_ws281x.git \
&& cd rpi_ws281x \ && cd rpi_ws281x \
&& mkdir build \ && mkdir build \
&& cd build \ && cd build \
&& cmake -D BUILD_SHARED=OFF -D BUILD_TEST=OFF .. \ && cmake -D BUILD_SHARED=OFF -D BUILD_TEST=OFF .. \
&& cmake --build . \ && cmake --build . --target install
&& make install
# Stage 1 : Build a go image with the rpi_ws281x C library and the go wrapper # Stage 1 : Build a go image with the rpi_ws281x C library and the go wrapper
FROM golang:alpine FROM golang:alpine
COPY --from=lib_builder /usr/local/lib/libws2811.a /usr/local/lib/ COPY --from=lib_builder /usr/local/lib/libws2811.a /usr/local/lib/
COPY --from=lib_builder /usr/local/include/ws2811 /usr/local/include/ws2811 COPY --from=lib_builder /usr/local/include/ws2811 /usr/local/include/ws2811
RUN apk add git make linux-headers cmake g++
# enable cgo and install build deps for the Go build
ENV CGO_ENABLED=1
RUN apk add --no-cache git build-base linux-headers cmake
WORKDIR /go/src/github.com/rpi-ws281x/rpi-ws281x-go WORKDIR /go/src/github.com/rpi-ws281x/rpi-ws281x-go
COPY . . COPY . .
RUN GO111MODULE=off go get -d -v ./... # Build in GOPATH mode (this repo has no go.mod).
RUN GO111MODULE=off go build -v ./... ENV GO111MODULE=off
RUN go build -v ./...
WORKDIR /go WORKDIR /go

Loading…
Cancel
Save