File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
images/extension-builders/tinygo Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change 1818
1919FROM golang:1.15
2020
21- ENV TINYGO_VERSION=0.15.0
21+ RUN git clone --recursive -b non-js-wasm https://github.com/mathetake/tinygo tinygo
22+ WORKDIR tinygo
23+ RUN apt-get update && apt-get -y install cmake clang ninja-build
24+ ENV CC=clang
25+ ENV CXX=clang++
2226
23- RUN wget https://github.com/tinygo-org/tinygo/releases/download/v${TINYGO_VERSION}/tinygo_${TINYGO_VERSION}_amd64.deb
24- RUN dpkg -i tinygo_${TINYGO_VERSION}_amd64.deb && rm tinygo_${TINYGO_VERSION}_amd64.deb
27+ RUN make llvm-source
28+ RUN make llvm-build
29+ RUN make wasi-libc
30+ RUN make tinygo
31+
32+ FROM golang:1.15
33+
34+ # TODO: use upstream TinyGo after https://github.com/tinygo-org/tinygo/pull/1373 is merged
35+ COPY --from=0 /go/tinygo/build/tinygo /usr/local/bin
2536
2637ENV GOCACHE=/source/.gocache
2738ENV GOMODCACHE=/source/.gomodcache
2839ENV XDG_CACHE_HOME=/source/.cache
2940
30- ENV TINYGO_SDK_NAME=github.com/tetratelabs/proxy-wasm-go-sdk
31- ENV TINYGO_SDK_VERSION=v0.0.2
32- ENV TINYGO_SDK_PATH=${GOMODCACHE}/${TINYGO_SDK_NAME}@${TINYGO_SDK_VERSION}
33-
34- RUN mkdir -p ${TINYGO_SDK_PATH} && git clone https://${TINYGO_SDK_NAME} -b ${TINYGO_SDK_VERSION} ${TINYGO_SDK_PATH}
35-
3641COPY ./entrypoint.sh /usr/local/getenvoy/extension/builder/entrypoint.sh
3742COPY ./tinygo/commands.sh /usr/local/getenvoy/extension/builder/commands.sh
3843ENTRYPOINT ["/usr/local/getenvoy/extension/builder/entrypoint.sh" ]
You can’t perform that action at this time.
0 commit comments