Public | Automated Build

Last pushed: 2 years ago
Short Description
Small image based in alpine that you can use like filesystem code from repository
Full Description


Docker image to download git private repository in a alpine image

This image is ideal for serving application files without accessing the server.
Only run one machine and link with your Stack

No password.

Add public key in

Obviously, you must have an account in Bitbucket.

Go to account settings:[USERNAME]

And then click into SSH keys.

Click in Add key and paste your public key

Generate an specific key for Bitbucket

Use this command:

>_ ssh-keygen -t rsa -b 4096 -C “email” -f filename

And then you have 2 files:

  1. filename, this is the private key.
  2., this is the public key.

If you want generate the IDRSA environment variable to connect to without password
you might use:

>_ grep "^--" -v filename | paste -s -d ""
>_ #If you want set clipboard
>_ grep "^--" -v filename | paste -s -d "" | xclip -sel clip 

Environment variables

  • IDRSA this is mandatory variable with the private RSA key. This var should be
    in one line and whiout the rsa marks (-----BEGIN|END RSA PRIVATE KEY-----).
  • REPO this is the reposotiry’s name without domain (deploymentbox/my-repo.git)
  • BRANCH this var is optional and is the name of the clone branch. By default is master.

Run an example

This example download a repository and copy in a local folder:

>_ mkdir /tmp/django-jquery 
>_ IDRSA=$(grep "^--" -v id_rsa | paste -s -d "")
>_ docker run --rm -v /tmp/django-jquery:/app -e IDRSA=$IDRSA \
-e REPO=massimilianoravelli/django-jquery canonale/bitbucket 
Docker Pull Command
Source Repository