Monday, 14 March 2022

Using Makefile in Docker projects

 

To wrap docker build and docker run commands which contain multiple arguments into simpler make commands we can add Makefile to Docker-based projects.

Makefile example:
 
DOCKER_IMAGE_NAME := my-app

build:
#    cp -R ~/.aws ./my_db/.aws
#    docker image rm $(DOCKER_IMAGE_NAME) || (echo "Image $(DOCKER_IMAGE_NAME) didn't exist so not removed."; exit 0)
    docker build -t $(DOCKER_IMAGE_NAME) .
run:
#   Usage: make run AWS_REGION=us-east-1 AWS_DEFAULT_OUTPUT=json AWS_ACCESS_KEY_ID=id AWS_SECRET_ACCESS_KEY=key
    docker run \
        -e AWS_REGION=$(AWS_REGION) \
        -e AWS_DEFAULT_OUTPUT=$(AWS_DEFAULT_OUTPUT) \
        -e AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID) \
        -e AWS_SECRET_ACCESS_KEY=$(AWS_SECRET_ACCESS_KEY) \
        -v "$(shell pwd)"/shared:/usr/src/my-app/out/ \
        --rm \
        --name $(DOCKER_IMAGE_NAME) \
        $(DOCKER_IMAGE_NAME) 

To build the Docker image: 

$ make build

To run it:

$ make run AWS_REGION=us-east-1 AWS_DEFAULT_OUTPUT=json AWS_ACCESS_KEY_ID=<id> AWS_SECRET_ACCESS_KEY=<key>


3 comments:

Unknown said...

Welcome to the future! Financing made easy with Prof. Mrs. DOROTHY LOAN INVESTMENTS

Hello, Have you been looking for financing options for your new business plans, Are you seeking for a loan to expand your existing business, Do you find yourself in a bit of trouble with unpaid bills and you don’t know which way to go or where to turn to? Have you been turned down by your banks? MRS. DOROTHY JEAN INVESTMENTS says YES when your banks say NO. Contact us as we offer financial services at a low and affordable interest rate of 2% for long and short term loans. Interested applicants should contact us for further loan acquisition procedures via profdorothyinvestments@gmail.com

We invest in all profitable projects with cryptocurrencies. I'm here to share an amazing life changing opportunity with you. its called Bitcoin / Forex trading options, Are you interested in earning a consistent income through binary/forex trade? or crypto currency trading. An investment of $100 or $200 can get you a return of $2,840 in 7 days of trading and you get to do this from the comfort of your home/work. It goes on and on The higher the investment, the higher the profits. Your investment is safe and secured and payouts assured 100%. if you wish to know more about investing in Cryptocurrency and earn daily, weekly OR Monthly in trading on bitcoin or any cryptocurrency and want a successful trade without losing Contact MRS.DOROTHY JEAN INVESTMENTS profdorothyinvestments@gmail.com

categories of investment

Cryptocurrency
Loan Offer
Mining Plan
Business Finance Plan
Binary option Trade Plan
Forex trade Plan
Stocks market Trade Plan
Return on investment (ROI) Plan
Gold and Silver Trade Plan
Oil and Gas Trade Plan
Diamond Trade Plan
Agriculture Trade Plan
Real Estate Trade Plan

YOURS IN SERVICE
Mrs. Dorothy Pilkenton Jean
Financial Advisor on Bank Instruments,
Private Banking and Client Services
Email Address: profdorothyinvestments@gmail.com
Operation: We provide Financial Service Such As Bank Instrument
From AA Rate Banks, Cash Loan,BG,SBLC,BOND,PPP,MTN,TRADING,FUNDING MONETIZING etc.

Unknown said...

Welcome to the future! Financing made easy with Prof. Mrs. DOROTHY JEAN INVESTMENTS

Hello, Have you been looking for financing options for your new business plans, Are you seeking for a loan to expand your existing business, Do you find yourself in a bit of trouble with unpaid bills and you don’t know which way to go or where to turn to? Have you been turned down by your banks? MRS. DOROTHY JEAN INVESTMENTS says YES when your banks say NO. Contact us as we offer financial services at a low and affordable interest rate of 2% for long and short term loans. Interested applicants should contact us for further loan acquisition procedures via profdorothyinvestments@gmail.com

We invest in all profitable projects with cryptocurrencies. I'm here to share an amazing life changing opportunity with you. its called Bitcoin / Forex trading options, Are you interested in earning a consistent income through binary/forex trade? or crypto currency trading. An investment of $100 or $200 can get you a return of $2,840 in 7 days of trading and you get to do this from the comfort of your home/work. It goes on and on The higher the investment, the higher the profits. Your investment is safe and secured and payouts assured 100%. if you wish to know more about investing in Cryptocurrency and earn daily, weekly OR Monthly in trading on bitcoin or any cryptocurrency and want a successful trade without losing Contact MRS.DOROTHY JEAN INVESTMENTS Email profdorothyinvestments@gmail.com


YOURS IN SERVICE
Mrs. Dorothy Pilkenton Jean
Financial Advisor on Bank Instruments,
Private Banking and Client Services
Email Address: profdorothyinvestments@gmail.com
Operation: We provide Financial Service Such As Bank Instrument
From AA Rate Banks, Cash Loan,BG,SBLC,BOND,PPP,MTN,TRADING,FUNDING MONETIZING etc.

Taylor said...

I just have to introduce this hacker that I have been working with him on getting my credit score been boosted across the Equifax, TransUnion and Experian report. He made a lot of good changes on my credit report by erasing all the past eviction, bad collections and DUI off my credit report history and also increased my FICO score above 876 across my three credit bureaus report you can contact him for all kind of hacks . Email him here support@wavedrive.tech go on their website wavedrive.tech for more details,Whatsapp No:+14106350697 if you want to chat them up,One thing i can assure you would not regret this at all he is 100% legit