Sign inSign up

theyorkshiredev/docker-bootstrap

By theyorkshiredev

•Updated over 8 years ago

Docker image produced using a GitLab, GitHub and DockerHub pipeline.

Image
1

100K+

theyorkshiredev/docker-bootstrap repository overview

⁠Docker Bootstrap

This repository demonstrates a basic docker image and shows the pipeline for developing docker images within GitLab. Once the image has been developed, the master branch is mirrored on Github and that latest tagged image is deployed to DockerHub.

⁠Pipeline

Development and Continuous Integration on GitLab

GitLab Logo

Publish to GitHub

GitHub Logo

Release to DockerHub

DockerHub Logo

⁠Build & Release Status

⁠Build

Build Status GitHub tag license

⁠Docker Image

Docker Build Status Docker Automated build Docker Pulls Docker Stars

⁠GitLab Development Environment

⁠GitLab General Settings
  • Merge Requests: Fast-forward merge
  • Only allow merge requests to be merged if the pipeline succeeds
⁠GitLab Repository Settings
⁠Push Rule

Set the following rules:

  • Do not allow users to remove git tags with git push
  • Prevent committing secrets to Git

⁠GitHub Deployment

⁠Github Setup
  • Create a GitHub repository mirroring the same name as the GitLab repository.
  • Create a personal token on GitHub with the permission Access public repositories allowing the user to push to the repository.
  • Add the personal token as an environment variable for the pipeline called GITHUB_TOKEN
⁠Github Repository

Within the repository settings:

  • Uncheck the Wikis feature
  • Uncheck the Restrict editing to collaborators only feature
  • Uncheck the Issues feature
  • Uncheck the Projects feature

⁠DockerHub Release

  • Create an automated-build within docker hub
  • Link the DockerHub repository and the github repository
  • Add build step: TAG, /^[0-9.]+$/, /, latest
  • Add build step: TAG, /^[0-9.]+$/, /
  • Uncheck automatic build on push
  • Activate triggers
  • Store the trigger token in an environment variable $DOCKERHUB_TOKEN

⁠Contribute

Please Note: The development of this project is done within a GitLab repository and uses the integrated GitLab CI. If you wish to contribute in anyway feel free to send pull requests and submit issues on GitLab. This GitHub repository is a mirror of the master branch within GitLab and is intended for users unfamiliar with GitLab.

Tag summary

Content type

Image

Digest

Size

39.5 MB

Last updated

over 8 years ago

docker pull theyorkshiredev/docker-bootstrap