Deploy CodeScene using Docker

Deployment prerequisites

Before proceeding, make sure you have Docker installed on your desktop. If you don't have Docker installed, follow the installment instructions for Mac, Windows or Linux.

 

Video walkthrough
See this video for a complete walkthrough of deploying CodeScene using Docker.

 

 


Deployment instructions

Follow the steps below to deploy CodeScene locally:

 

1. Start CodeScene
(Need help with this step? Watch the video.)

  • Make sure Docker is up and running before running the command below. To start CodeScene, open Terminal and run docker run by pasting the below command:


docker run -d -p 3003:3003 --name codescene -v codescene:/codescene codescene/codescene
  • If port 3003 already is used, replace it with a port of your choice.

 

 

2. Create an SSH key
(Need help with this step? Watch the video.)

    • Paste the command below to your Terminal, substitute “your_email@example.com” with your Git email address and run it to generate a new SSH key inside the container with no passphrase.


docker exec -it -u codescene codescene ssh-keygen -t ed25519 -C "your_email@example.com"


      • When you are prompted to "Enter a file in which to save the key," press Enter to accept the default file location
        .
Enter a file in which to save the key (/Users/YOU/.ssh/id_ed25519_sk): [Press enter]


        • When you are prompted to type a passphrase, press Enter for no passphrase:

> Enter passphrase (empty for no passphrase): [Type a passphrase]

> Enter same passphrase again: [Type passphrase again]



      • To add the SSH authentication key to your Git account, display the key by pasting the command below:

docker exec -it -u codescene codescene ssh-keygen -y -t ed25519

 

      • Add the SSH authentication key with read access to your account on Git provider. For more information on how to add an SSH key to your account, read GitHub documentation or refer to your Git provider’s specific documentation.

 

 

3. Activate CodeScene
(Need help with this step? Watch the video.)

    • If you deployed locally, go to localhost:3003 and choose “Start Free Trial” option.

    • If you deployed to a remote server, use the server's hostname instead of localhost.

  • After you click "Start Free Trial", you'll be asked to create an account.

Need support?