summaryrefslogtreecommitdiffhomepage
path: root/website
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-10-15 17:19:21 -0700
committergVisor bot <gvisor-bot@google.com>2020-10-15 17:21:24 -0700
commit0a7e32bd17fb3f4aae8fdea427283cda49fe002f (patch)
treeab9367eb9cd6c226ca4857b8217de21552c294ee /website
parent0d54b41e550b452bb990cca55f642169502b82f2 (diff)
Add easier-to-use docker_image target.
PiperOrigin-RevId: 337415009
Diffstat (limited to 'website')
-rw-r--r--website/BUILD12
-rwxr-xr-xwebsite/import.sh27
2 files changed, 5 insertions, 34 deletions
diff --git a/website/BUILD b/website/BUILD
index 6d92d9103..f3642b903 100644
--- a/website/BUILD
+++ b/website/BUILD
@@ -1,17 +1,15 @@
load("//tools:defs.bzl", "bzl_library", "pkg_tar")
load("//website:defs.bzl", "doc", "docs")
+load("//images:defs.bzl", "docker_image")
package(licenses = ["notice"])
-# website is the full container image. Note that this actually just collects
-# other dependendcies and runs Docker locally to import and tag the image.
-sh_binary(
+docker_image(
name = "website",
- srcs = ["import.sh"],
data = [":files"],
- tags = [
- "local",
- "manual",
+ statements = [
+ "EXPOSE 8080/tcp",
+ 'ENTRYPOINT ["/server"]',
],
)
diff --git a/website/import.sh b/website/import.sh
deleted file mode 100755
index e1350e83d..000000000
--- a/website/import.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-# Copyright 2018 The gVisor Authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set -xeuo pipefail
-
-if [[ -d $0.runfiles ]]; then
- cd $0.runfiles
-fi
-
-exec docker import \
- -c "EXPOSE 8080/tcp" \
- -c "ENTRYPOINT [\"/server\"]" \
- $(find . -name files.tgz) \
- gvisor.dev/images/website