FEAT: docker image push script
This commit is contained in:
@ -52,7 +52,7 @@ When using with the Claude App, you need to set up your API key and URLs directl
|
||||
"GITLAB_READ_ONLY_MODE",
|
||||
"-e",
|
||||
"USE_GITLAB_WIKI",
|
||||
"nkwd/gitlab-mcp"
|
||||
"iwakitakuma/gitlab-mcp"
|
||||
],
|
||||
"env": {
|
||||
"GITLAB_PERSONAL_ACCESS_TOKEN": "your_gitlab_token",
|
||||
@ -65,6 +65,12 @@ When using with the Claude App, you need to set up your API key and URLs directl
|
||||
}
|
||||
```
|
||||
|
||||
#### Docker Image Push
|
||||
|
||||
```shell
|
||||
$ sh scripts/image_push.sh docker_user_name
|
||||
```
|
||||
|
||||
### Environment Variables
|
||||
|
||||
- `GITLAB_PERSONAL_ACCESS_TOKEN`: Your GitLab personal access token.
|
||||
|
18
scripts/image_push.sh
Normal file
18
scripts/image_push.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Error: docker user name required."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DOCKER_USER=$1
|
||||
IMAGE_NAME=gitlab-mcp
|
||||
IMAGE_VERSION=$(jq -r '.version' package.json)
|
||||
|
||||
echo "${DOCKER_USER}/${IMAGE_NAME}:${IMAGE_VERSION}"
|
||||
docker build --platform=linux/arm64 -t "${DOCKER_USER}/${IMAGE_NAME}:latest" .
|
||||
|
||||
docker tag "${DOCKER_USER}/${IMAGE_NAME}:latest" "${DOCKER_USER}/${IMAGE_NAME}:${IMAGE_VERSION}"
|
||||
|
||||
docker push "${DOCKER_USER}/${IMAGE_NAME}:latest"
|
||||
docker push "${DOCKER_USER}/${IMAGE_NAME}:${IMAGE_VERSION}"
|
Reference in New Issue
Block a user