Published on

Dockerfile

Authors
  • avatar
    Name
    PatharaNor
    Twitter

Development

Remote with SSH key

To see the big picture, I assume scenario below :

I need to download some package/library from Bitbucket via SSH key on local machine. I save the private key in ~/.ssh name bitbucket :

# Example the private key
cat ~/.ssh/bitbucket

-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QQAAAAt..............................................zi5dh1NVGj2Wn1tSg
AAAEDFwTiDYKRKzLJTQUmMx921wPucyEtkjxRlsZOXQSHbKhKH8dIhJO/RGYJqsMrxj7/c
3HhPOLl2HU1UaPZafW1KAAAAFXBhdGhhcmEubm9AYmRtcy5jby50aA==
-----END OPENSSH PRIVATE KEY-----

For my service (or myservice) using prisma to initial table in PostgreSQL database. I have 4-files below in the root of the project :

  • Dockerfile.local
  • docker-compose.local.yml
  • entrypoint.local.sh
  • run.local.sh

Then just run :

sh run.local.sh

Enjoy!!!

Hot reload

Production