Last active
March 24, 2023 21:55
-
-
Save tfmeneses/c023fc016ad2583a6170fdd1127bfe34 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1# | |
mkdir my-git-project | |
cd my-git-project | |
git init | |
git commit --allow-empty -m"Initialize repo to showcase gitlab-runner locally." | |
#2 | |
Example .gitlab-ci.yml | |
image: alpine | |
test: | |
script: | |
- echo "Hello Gitlab-Runner" | |
3. Create a docker container with your project dir mounted | |
docker run -d --name gitlab-runner --network=host --restart always -v ${PWD}:/opt/myapp -v /var/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner:latest | |
docker exec -it -w /opt/myapp gitlab-runner gitlab-runner exec docker test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment