mirror of https://github.com/statping/statping
sassc build for each arch
parent
1a73147669
commit
4ad93f8767
|
@ -5,14 +5,14 @@ FROM alpine:latest
|
||||||
RUN apk --no-cache add libgcc libstdc++ ca-certificates curl jq && update-ca-certificates
|
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 /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/
|
COPY --from=base /usr/local/share/ca-certificates /usr/local/share/
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
VOLUME /app
|
VOLUME /app
|
||||||
|
|
||||||
ENV IS_DOCKER=true
|
ENV IS_DOCKER=true
|
||||||
ENV SASS=/usr/local/bin/sass
|
ENV SASS=/usr/local/bin/sassc
|
||||||
ENV STATPING_DIR=/app
|
ENV STATPING_DIR=/app
|
||||||
ENV PORT=8080
|
ENV PORT=8080
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,15 @@ LABEL maintainer="Hunter Long (https://github.com/hunterlong)"
|
||||||
ARG VERSION
|
ARG VERSION
|
||||||
ARG BUILDPLATFORM
|
ARG BUILDPLATFORM
|
||||||
ARG TARGETARCH
|
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
|
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
|
WORKDIR /go/src/github.com/statping/statping
|
||||||
ADD go.mod go.sum ./
|
ADD go.mod go.sum ./
|
||||||
RUN go mod download
|
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 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
|
RUN chmod a+x statping && mv statping /go/bin/statping
|
||||||
# /go/bin/statping - statping binary
|
# /go/bin/statping - statping binary
|
||||||
# /usr/local/bin/sass - sass binary
|
# /root/sassc/bin/sassc - sass binary
|
||||||
# /statping - Vue frontend (from frontend)
|
# /statping - Vue frontend (from frontend)
|
||||||
|
|
Loading…
Reference in New Issue