-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
env: add wasip1/wasm wasmtime builder
This builder installs wasmtime, a Wasm runtime with WASI support. For golang/go#59150 Change-Id: I7d1db6c9f5ec2b4257e3961b552f3de0bb7ed049 Reviewed-on: https://go-review.googlesource.com/c/build/+/479121 Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com>
- Loading branch information
1 parent
2805ef1
commit 579d681
Showing
5 changed files
with
647 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,21 @@ | ||
# Copyright 2022 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 debian:latest as builder | ||
LABEL maintainer="golang-dev@googlegroups.com" | ||
|
||
RUN apt-get update && apt-get -y install curl xz-utils | ||
|
||
# A copy of https://wasmtime.dev/install.sh. | ||
COPY install.sh install.sh | ||
|
||
RUN bash install.sh --version v7.0.0 | ||
|
||
FROM ${REPO}/linux-x86-sid:20221109 | ||
|
||
COPY --from=builder /root/.wasmtime/bin/wasmtime /usr/local/bin/wasmtime | ||
|
||
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 |
Oops, something went wrong.