Skip to content

Commit 44281c1

Browse files
committed
add builder image for TinyGo
Signed-off-by: mathetake <[email protected]>
1 parent c8513da commit 44281c1

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
ENVOY = standard:1.11.1
1616
HUB ?= docker.io/getenvoy
1717
GETENVOY_TAG ?= dev
18-
BUILDERS_LANGS := rust
18+
BUILDERS_LANGS := rust tinygo
1919
BUILDERS_TAG ?= latest
2020
EXTRA_TAG ?=
2121

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright 2020 Tetrate
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
#
16+
# Builder image for Envoy Wasm extensions written in Go.
17+
#
18+
19+
FROM golang:1.15
20+
21+
ENV TINYGO_VERSION=0.15.0
22+
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
25+
26+
ENV TINYGO_SDK_NAME=github.com/tetratelabs/proxy-wasm-go-sdk
27+
ENV TINYGO_SDK_VERSION=v0.0.1
28+
ENV TINYGO_SDK_PATH=${GOPATH}/src/${TINYGO_SDK_NAME}
29+
30+
RUN mkdir -p ${TINYGO_SDK_PATH} && git clone https://${TINYGO_SDK_NAME} -b ${TINYGO_SDK_VERSION} ${TINYGO_SDK_PATH}

0 commit comments

Comments
 (0)