mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 06:12:55 +00:00
Jakub Sokołowski
9ad8829ce0
Otherwise builds fail with: ``` sqlite3.c:37493:42: error: 'pread64' undeclared here (not in a function); did you mean 'pread'? 37493 | { "pread64", (sqlite3_syscall_ptr)pread64, 0 }, | ^~~~~~~ | pread sqlite3.c:37511:42: error: 'pwrite64' undeclared here (not in a function); did you mean 'pwrite'? 37511 | { "pwrite64", (sqlite3_syscall_ptr)pwrite64, 0 }, | ^~~~~~~~ | pwrite sqlite3.c: In function 'seekAndRead': sqlite3.c:37497:49: error: unknown type name 'off64_t'; did you mean 'off_t'? 37497 | #define osPread64 ((ssize_t(*)(int,void*,size_t,off64_t))aSyscall[10].pCurrent) | ^~~~~~~ ``` Signed-off-by: Jakub Sokołowski <jakub@status.im>
38 lines
1.1 KiB
Docker
38 lines
1.1 KiB
Docker
# Build status-go in a Go builder container
|
|
FROM golang:1.20-alpine3.18 as builder
|
|
|
|
|
|
RUN apk add --no-cache make gcc g++ musl-dev linux-headers
|
|
|
|
ARG build_tags
|
|
ARG build_flags
|
|
ARG build_target=statusgo
|
|
|
|
RUN mkdir -p /go/src/github.com/status-im/status-go
|
|
WORKDIR /go/src/github.com/status-im/status-go
|
|
ADD . .
|
|
RUN make $build_target BUILD_TAGS="$build_tags" BUILD_FLAGS="$build_flags" SHELL="/bin/sh"
|
|
|
|
# Copy the binary to the second image
|
|
FROM alpine:3.18
|
|
|
|
ARG build_target=statusgo
|
|
|
|
LABEL maintainer="support@status.im"
|
|
LABEL source="https://github.com/status-im/status-go"
|
|
LABEL description="status-go is an underlying part of Status - a browser, messenger, and gateway to a decentralized world."
|
|
|
|
RUN apk add --no-cache ca-certificates bash libgcc libstdc++
|
|
RUN mkdir -p /static/keys
|
|
|
|
COPY --from=builder /go/src/github.com/status-im/status-go/build/bin/$build_target /usr/local/bin/
|
|
COPY --from=builder /go/src/github.com/status-im/status-go/static/keys/* /static/keys/
|
|
|
|
RUN ln -s /usr/local/bin/$build_target /usr/local/bin/entrypoint
|
|
|
|
# 30304 is used for Discovery v5
|
|
EXPOSE 8080 8545 30303 30303/udp 30304/udp
|
|
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint"]
|
|
CMD ["--help"]
|