Skip to content

Commit

Permalink
[docker][feat] Add someengineering/resh container (#789)
Browse files Browse the repository at this point in the history
* Add someengineering/resh container
  • Loading branch information
lloesche committed Apr 21, 2022
1 parent 1763105 commit 9dadc0e
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker-build.yml
Expand Up @@ -220,7 +220,9 @@ jobs:
with:
images: |
someengineering/resotoshell
someengineering/resh
ghcr.io/someengineering/resotoshell
ghcr.io/someengineering/resh
flavor: |
latest=${{ steps.platform.outputs.latest }}
tags: |
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
@@ -1,3 +1,5 @@
# This standalone container contains all of Resoto plus dependencies.
# Including ArangoDB and Prometheus.
ARG UI_IMAGE_TAG=latest
FROM ghcr.io/someengineering/resoto-ui:${UI_IMAGE_TAG} as resoto-ui-env

Expand Down
5 changes: 5 additions & 0 deletions Dockerfile.resotobase
@@ -1,3 +1,8 @@
# This is the resoto base container. It includes CPython and pypy and is used
# as the common base for all the other containers. The main size contributor
# is the resoto-venv-python3 and resoto-venv-pypy3 virtual environments which
# are required for all resoto packages. That's why size wise it made sense to
# use the same base package for all containers.
ARG UI_IMAGE_TAG=latest
FROM ghcr.io/someengineering/resoto-ui:${UI_IMAGE_TAG} as resoto-ui-env

Expand Down
1 change: 1 addition & 0 deletions Dockerfile.resotocore
@@ -1,3 +1,4 @@
# This container runs `resotocore`.
ARG IMAGE_TAG=edge
FROM ghcr.io/someengineering/resotobase:${IMAGE_TAG}
EXPOSE 8900
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.resotometrics
@@ -1,3 +1,4 @@
# This container runs `resotometrics`.
ARG IMAGE_TAG=edge
FROM ghcr.io/someengineering/resotobase:${IMAGE_TAG}
EXPOSE 9955
Expand Down
7 changes: 6 additions & 1 deletion Dockerfile.resotoshell
@@ -1,3 +1,8 @@
# This container runs `resh`. If the `--wait` flag is provided it will instead
# go into an endless loop and wait for users to exec `resh` inside the container.
# The idea being that this container is e.g. deployed into a k8s environment
# having access to `resotocore`. Users can then authenticate with the k8s cluster
# and kubectl exec into the container to run `resh`.
ARG IMAGE_TAG=edge
FROM ghcr.io/someengineering/resotobase:${IMAGE_TAG}
ENTRYPOINT ["/bin/dumb-init", "--", "/usr/local/sbin/bootstrap", "/usr/local/bin/resh-wait"]
ENTRYPOINT ["/bin/dumb-init", "--", "/usr/local/sbin/bootstrap", "/usr/bin/resh"]
1 change: 1 addition & 0 deletions Dockerfile.resotoworker
@@ -1,3 +1,4 @@
# This container runs `resotoworker`.
ARG IMAGE_TAG=edge
FROM ghcr.io/someengineering/resotobase:${IMAGE_TAG}
EXPOSE 9956
Expand Down
10 changes: 6 additions & 4 deletions docker-compose.yaml
Expand Up @@ -23,7 +23,7 @@ services:
- --web.console.libraries=/usr/share/prometheus/console_libraries
- --web.console.templates=/usr/share/prometheus/consoles
resotocore:
image: somecr.io/someengineering/resotocore:2.0
image: somecr.io/someengineering/resotocore:edge
depends_on:
- graphdb
ports:
Expand All @@ -43,7 +43,7 @@ services:
restart: always
stop_grace_period: 2m
resotoworker:
image: somecr.io/someengineering/resotoworker:2.0
image: somecr.io/someengineering/resotoworker:edge
depends_on:
- resotocore
ports:
Expand All @@ -54,7 +54,7 @@ services:
restart: always
stop_grace_period: 2m
resotometrics:
image: somecr.io/someengineering/resotometrics:2.0
image: somecr.io/someengineering/resotometrics:edge
depends_on:
- resotocore
ports:
Expand All @@ -65,12 +65,14 @@ services:
restart: always
stop_grace_period: 2m
resotoshell:
image: somecr.io/someengineering/resotoshell:2.0
image: somecr.io/someengineering/resotoshell:edge
depends_on:
- resotocore
environment:
- PSK
- RESOTOSHELL_RESOTOCORE_URI=https://resotocore:8900
command:
- --wait
restart: always
stop_grace_period: 2m
volumes:
Expand Down
7 changes: 6 additions & 1 deletion dockerV2/resh-shim
Expand Up @@ -3,4 +3,9 @@
. /usr/local/resoto-venv-python3/bin/activate
export RESOTOSHELL_PSK
export RESOTOSHELL_RESOTOCORE_URI
exec resh "$@"

if [ "$1" = "--wait" ]; then
exec /usr/local/bin/resh-wait
else
exec resh "$@"
fi

0 comments on commit 9dadc0e

Please sign in to comment.