mschadev / build-dockerfile-using-runner-in-gitlab

build dockerfile using Runner in GitLab.(This project uses .Net Core as an example.)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build-dockerfile-using-runner-in-gitlab

standard-readme compliant

build dockerfile using Runner in GitLab.(This project uses .Net Core as an example.)

Table of Contents

Install

Before starting, a Docker must be installed.

Install GitLab-Runner

$ ssh -p [port] [user]@url
# Create container
$ sudo docker run -d \
--name [container-name] \
--restart always \
--volume /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:latest
$ sudo docker exec -it [container-name] bash
# Registry GitLab-Runner
$ gitlab-runner register -n \
--url "[url]" \
--registration-token "[token]" \
--description "[description]" \
--executor docker \
--docker-image "docker:18.09.8" \
--docker-volumes /var/run/docker.sock:/var/run/docker.sock

Upload project

$ git clone https://github.com/zxc010613/build-dockerfile-using-runner-in-gitlab.git
$ cd build-dockerfile-using-runner-in-gitlab
$ git remote set-url origin [gitlab-project]
$ git push origin master

Usage

1 2

Maintainers

@zxc010613

Contributing

PRs accepted.

License

MIT

About

build dockerfile using Runner in GitLab.(This project uses .Net Core as an example.)

License:MIT License


Languages

Language:Dockerfile 78.8%Language:C# 21.2%