blob: f0c47f7f0e5092761f897b2589a186e55240b3ac [file] [log] [blame]
load("@io_bazel_rules_docker//container:container.bzl", "container_image")
container_image(
name="0.16.51-1",
base="@prodimage-bionic//image",
tars = ["@factorio-headless-0.16.51//file"],
files = [":entrypoint.sh"],
directory = "/",
entrypoint = ["/entrypoint.sh"],
)
container_image(
name="0.17.41-1",
base="@prodimage-bionic//image",
tars = ["@factorio-headless-0.17.41//file"],
files = [":entrypoint.sh"],
directory = "/",
entrypoint = ["/entrypoint.sh"],
)
container_image(
name="0.17.52-1",
base="@prodimage-bionic//image",
tars = ["@factorio-headless-0.17.52//file"],
files = [":entrypoint.sh"],
directory = "/",
entrypoint = ["/entrypoint.sh"],
)
# Totally broken right now because google/containerregistry doesn't handle
# /usr/bin/env python == python3.
#container_push(
# name = "push_latest",
# image = ":latest",
# format = "Docker",
# registry = "registry.k0.hswaw.net",
# repository = "app/factorio",
# tag = "latest",
#)
# So this is a replacement hack.
genrule(
name = "push_latest",
srcs = [":0.17.52-1"],
outs = ["version.sh"],
executable = True,
cmd = """
tag=0.17.52-1
docker tag bazel/app/factorio:$$tag registry.k0.hswaw.net/app/factorio:$$tag
docker push registry.k0.hswaw.net/app/factorio:$$tag
echo -ne "#!/bin/sh\necho Pushed $$tag.\n" > $(OUTS)
""",
)