diff --git a/Dockerfile b/Dockerfile index 2c55c1a4..44866305 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,14 +5,14 @@ FROM alpine:latest RUN apk --no-cache add libgcc libstdc++ ca-certificates curl jq && update-ca-certificates COPY --from=base /go/bin/statping /usr/local/bin/ -COPY --from=base /usr/local/bin/sass /usr/local/bin/ +COPY --from=base /root/sassc/bin/sassc /usr/local/bin/ COPY --from=base /usr/local/share/ca-certificates /usr/local/share/ WORKDIR /app VOLUME /app ENV IS_DOCKER=true -ENV SASS=/usr/local/bin/sass +ENV SASS=/usr/local/bin/sassc ENV STATPING_DIR=/app ENV PORT=8080 diff --git a/Dockerfile.base b/Dockerfile.base index 10d3d15b..d90888ce 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -15,10 +15,15 @@ LABEL maintainer="Hunter Long (https://github.com/hunterlong)" ARG VERSION ARG BUILDPLATFORM ARG TARGETARCH -RUN apk add --update --no-cache libstdc++ gcc g++ make git ca-certificates linux-headers wget curl jq && \ +RUN apk add --update --no-cache libstdc++ gcc g++ make git autoconf \ + libtool ca-certificates linux-headers wget curl jq && \ update-ca-certificates -RUN curl -L -s https://assets.statping.com/sass -o /usr/local/bin/sass && \ - chmod +x /usr/local/bin/sass + +WORKDIR /root +RUN git clone https://github.com/sass/sassc.git +RUN . sassc/script/bootstrap && make -C sassc -j4 +# sassc binary: /root/sassc/bin/sassc + WORKDIR /go/src/github.com/statping/statping ADD go.mod go.sum ./ RUN go mod download @@ -35,5 +40,5 @@ RUN make clean frontend-copy generate embed RUN GOOS=linux GOARCH=$TARGETARCH go build -a -ldflags "-s -w -extldflags -static -X main.VERSION=${VERSION}" -o statping --tags "netgo linux" ./cmd RUN chmod a+x statping && mv statping /go/bin/statping # /go/bin/statping - statping binary -# /usr/local/bin/sass - sass binary +# /root/sassc/bin/sassc - sass binary # /statping - Vue frontend (from frontend)