-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This builder installs wazero, a pure Go Wasm runtime with WASI support. Fixes golang/go#59150 Change-Id: Id27f7eff79848d0aec1434dad1bf5b57cbfff874 Reviewed-on: https://go-review.googlesource.com/c/build/+/479118 Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> Auto-Submit: Heschi Kreinick <heschi@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
- Loading branch information
1 parent
3e1213a
commit 2805ef1
Showing
4 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright 2023 The Go Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style | ||
# license that can be found in the LICENSE file. | ||
|
||
ARG REPO | ||
|
||
FROM golang:latest as builder | ||
LABEL maintainer="golang-dev@googlegroups.com" | ||
|
||
RUN go install github.com/tetratelabs/wazero/cmd/wazero@v1.0.1 | ||
|
||
FROM ${REPO}/linux-x86-sid:20221109 | ||
|
||
COPY --from=builder /go/bin/wazero /usr/local/bin/wazero | ||
|
||
CMD ["/usr/local/bin/stage0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 2023 The Go Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style | ||
# license that can be found in the LICENSE file. | ||
|
||
IMAGE_NAME=$(shell basename $(CURDIR)) | ||
PROD_REPO=gcr.io/symbolic-datum-552 | ||
|
||
usage: | ||
echo "Use prod or dev targets. For dev, specify your Docker repository with the REPO=foo argument." ; exit 1 | ||
|
||
prod: Dockerfile | ||
docker build -t $(PROD_REPO)/$(IMAGE_NAME):latest --build-arg REPO=$(PROD_REPO) -f Dockerfile . | ||
|
||
pushprod: prod | ||
docker push $(PROD_REPO)/$(IMAGE_NAME):latest | ||
|
||
# You must provide a REPO=your-repo-name arg when you make | ||
# this target. REPO is the name of the Docker repository | ||
# that will be prefixed to the name of the image being built. | ||
dev: Dockerfile | ||
docker build -t $(REPO)/$(IMAGE_NAME):latest --build-arg REPO=$(REPO) -f Dockerfile . | ||
docker push $(REPO)/$(IMAGE_NAME):latest |