Skip to content

Add the sanity check for docker image #1793

@git-hulk

Description

@git-hulk

We'd better add some sanity checks in:

check-docker:
name: Check Docker image
needs: [precondition, check-and-lint, check-typos]
if: ${{ needs.precondition.outputs.docs_only != 'true' }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Get core numbers
run: echo "NPROC=$(nproc)" >> $GITHUB_ENV
- uses: docker/build-push-action@v3
with:
context: .
build-args: MORE_BUILD_ARGS=-j${{ env.NPROC }}
push: false
tags: kvrocks:ci
outputs: type=docker
- name: Test built image
run: docker run --rm kvrocks:ci -v

Originally posted by @tisonkun in #1784 (comment)

As mentioned in the comments, we at least check if the docker listening port can be accessed from outside.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions