Skip to content

Commit

Permalink
Merge pull request apalache-mc#2941 from apalache-mc/igor/ci3
Browse files Browse the repository at this point in the history
Fixing the docker container workflow
  • Loading branch information
konnov authored Aug 16, 2024
2 parents 21349d5 + 93e6f32 commit 6f7e10c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

- Triggered by pull requests into `main`.
- Used for any artifacts that we deploy into production environments. Currently,
this only consists of our website at https://apalache.informal.systems.
this only consists of our website at https://apalache-mc.org.

## [./prepare-release.yml](./prepare-release.yml)

Expand Down
14 changes: 7 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import scala.sys.process._
///////////////////////////

name := "apalache"
maintainer := "apalache@informal.org"
maintainer := "apalache@konnov.phd"

// See https://www.scala-sbt.org/1.x/docs/Multi-Project.html#Build-wide+settings
ThisBuild / organizationName := "Informal Systems Inc."
ThisBuild / organizationHomepage := Some(url("https://informal.systems"))
ThisBuild / organizationName := "Apalache Development Team"
ThisBuild / organizationHomepage := Some(url("https://apalache-mc.org"))
ThisBuild / licenses += "Apache 2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")

// We store the version in a bare file to make accessing and updating the version trivial
Expand Down Expand Up @@ -351,7 +351,7 @@ lazy val root = (project in file("."))
log.info(s"Unpacking package ${pkg} to ${target_dir}")
// send outputs directly to std{err,out} instead of logging here
// to avoid misleading logging output from tar
// See https://github.com/informalsystems/apalache/pull/1382
// See https://github.com/apalache-mc/apalache/pull/1382
(s"tar zxvf ${pkg} -C ${target_dir}" !)
log.info(s"Symlinking ${current_pkg} -> ${unzipped}")
if (current_pkg.exists) {
Expand All @@ -369,7 +369,7 @@ lazy val root = (project in file("."))
docker / imageNames := {
val img: String => ImageName = s =>
ImageName(
namespace = Some("ghcr.io/informalsystems"),
namespace = Some("ghcr.io/apalache-mc"),
repository = name.value,
tag = Some(s),
)
Expand Down Expand Up @@ -406,7 +406,7 @@ docker / dockerfile := {

// We need sudo to run apalache using the user (created in the entrypoint script)
run("apt", "update")
run("apt", "install", "sudo")
run("apt", "install", "-y", "sudo")

entryPoint("/opt/apalache/bin/run-in-docker-container")
}
Expand All @@ -425,7 +425,7 @@ lazy val versionFile = settingKey[File]("Location of the file tracking the proje
// These tasks are used in our bespoke release pipeline
// TODO(shon): Once we've changed our packaging to conform to more standard SBT structures and practices,
// we should consider moving to a release pipeline based around sbt-release.
// See https://github.com/informalsystems/apalache/issues/1248
// See https://github.com/apalache-mc/apalache/issues/1248

lazy val printVersion = taskKey[Unit]("Print the current version")
printVersion := {
Expand Down
22 changes: 11 additions & 11 deletions docs/src/apalache/installation/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ suitable JVM, and the container supplies this. However, you must already have
To get the latest Apalache image, issue the command:

```bash
docker pull ghcr.io/informalsystems/apalache
docker pull ghcr.io/apalache-mc/apalache
```

## Running the docker image

To run an Apalache image, issue the command:

```bash
$ docker run --rm -v <your-spec-directory>:/var/apalache ghcr.io/informalsystems/apalache <args>
$ docker run --rm -v <your-spec-directory>:/var/apalache ghcr.io/apalache-mc/apalache <args>
```

The following docker parameters are used:
Expand All @@ -38,8 +38,8 @@ The following docker parameters are used:

When using SELinux, you might have to use the modified form of `-v` option:
`-v <your-spec-directory>:/var/apalache:z`
- `informalsystems/apalache` is the APALACHE docker image name. By default, the `latest` stable
version is used; you can also refer to a specific tool version, e.g., `informalsystems/apalache:0.6.0` or `informalsystems/apalache:main`
- `apalache-mc/apalache` is the APALACHE docker image name. By default, the `latest` stable
version is used; you can also refer to a specific tool version, e.g., `apalache-mc/apalache:0.6.0` or `apalache-mc/apalache:main`
- `<args>` are the tool arguments as described in [Running the Tool](../running.md).

We provide a convenience wrapper for this docker command in
Expand Down Expand Up @@ -67,11 +67,11 @@ Apalache in docker while sharing the working directory:

###### using the latest stable

$ alias apalache='docker run --rm -v $(pwd):/var/apalache ghcr.io/informalsystems/apalache'
$ alias apalache='docker run --rm -v $(pwd):/var/apalache ghcr.io/apalache-mc/apalache'

###### using the latest main

$ alias apalache='docker run --rm -v $(pwd):/var/apalache ghcr.io/informalsystems/apalache:main'
$ alias apalache='docker run --rm -v $(pwd):/var/apalache ghcr.io/apalache-mc/apalache:main'
```

## Using the development branch of Apalache
Expand All @@ -82,25 +82,25 @@ branch for a report of the newest features. Since we cut releases weekly, you
should have access to all the latest features in the last week by using the
`latest` tag. However, if you wish to use the very latest developments as they
are added throughout the week, you can run the image with the `main` tag: just
type `ghcr.io/informalsystems/apalache:main` instead of
`ghcr.io/informalsystems/apalache` everywhere.
type `ghcr.io/apalache-mc/apalache:main` instead of
`ghcr.io/apalache-mc/apalache` everywhere.

Do not forget to pull the docker image from time to time:

```bash
docker pull ghcr.io/informalsystems/apalache:main
docker pull ghcr.io/apalache-mc/apalache:main
```

Run it with the following command:

```bash
$ docker run --rm -v <your-spec-directory>:/var/apalache ghcr.io/informalsystems/apalache:main <args>
$ docker run --rm -v <your-spec-directory>:/var/apalache ghcr.io/apalache-mc/apalache:main <args>
```

To create an alias pointing to the `main` version:

```bash
$ alias apalache='docker run --rm -v $(pwd):/var/apalache ghcr.io/informalsystems/apalache:main'
$ alias apalache='docker run --rm -v $(pwd):/var/apalache ghcr.io/apalache-mc/apalache:main'
```

[changelog]: https://github.com/informalsystems/apalache/blob/main/CHANGES.md
Expand Down
4 changes: 2 additions & 2 deletions script/run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ if [ -z "$APALACHE_TAG" ]
then
>&2 echo "# No docker image supplied. Defaulting to '$default_tag'"
>&2 echo "# To run a specific docker tag set APALACHE_TAG."
img="ghcr.io/informalsystems/apalache:${default_tag}"
img="ghcr.io/apalache-mc/apalache:${default_tag}"
else
img="ghcr.io/informalsystems/apalache:${APALACHE_TAG}"
img="ghcr.io/apalache-mc/apalache:${APALACHE_TAG}"
fi

# TODO Programmatically generate envars to expose here
Expand Down

0 comments on commit 6f7e10c

Please sign in to comment.