Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building docker image locally #4377

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/tutorials/Docker-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ Alternatively, it is possible to build a docker image based on any commit availa
./tools/build-docker-from-remote.sh $COMMIT_HASH
```

Check the image information:

```bash
docker inspect docker.io/library/mongooseim
```

You can also push `"docker.io/library/mongooseim"` to some registry.

## Running docker image

Full tutorial on running a docker image is available on [mongooseim-docker](https://github.com/esl/mongooseim-docker) GitHub. Here only simple and one-node configuration will be presented. In order to run it execute:
Expand Down
3 changes: 0 additions & 3 deletions tools/build-docker-from-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,3 @@ docker rm -f $CID

# Build a final image
docker build -f Dockerfile.member -t mongooseim .

cd ..
rm -rf mongooseim-docker
15 changes: 11 additions & 4 deletions tools/circleci-prepare-mongooseim-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ if [ -n "$CIRCLE_PULL_REQUEST" ]; then
# TODO: Possibly change it to something else during Tide integration
PR_NUMBER=${CIRCLE_PULL_REQUEST##*/}
DOCKERHUB_TAG="PR-${PR_NUMBER}"
elif [ ${CIRCLE_BRANCH} == 'master' ]; then
elif [ "${CIRCLE_BRANCH}" == 'master' ]; then
DOCKERHUB_TAG="latest";
fi

echo "Tag: ${DOCKERHUB_TAG}"

export IMAGE_TAG=${DOCKERHUB_REPO}/mongooseim:${DOCKERHUB_TAG}

git clone https://github.com/esl/mongooseim-docker.git
cd mongooseim-docker
git checkout $MIM_DOCKER_VERSION
if [ -d mongooseim-docker ]; then
# We already have mongooseim-docker, just fetch the required version
cd mongooseim-docker
git fetch
git checkout "$MIM_DOCKER_VERSION"
else
git clone https://github.com/esl/mongooseim-docker.git
cd mongooseim-docker
git checkout "$MIM_DOCKER_VERSION"
fi