Skip to content

Instantly share code, notes, and snippets.

@kamoljan
Created February 18, 2016 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kamoljan/e73f5cb563a4e1d2184c to your computer and use it in GitHub Desktop.
Save kamoljan/e73f5cb563a4e1d2184c to your computer and use it in GitHub Desktop.
# build_args() {
# printf " --build-arg %s=%s" "$@"
# }
# sudo docker build $(build_args IMS_AD_PORT IMS_AD_PARSE_APP_ID IMS_AD_PARSE_JS_KEY IMS_AD_AWS_SQS_QUEUE) \
# -t kamoljan/ad:1.0 api
@kamoljan
Copy link
Author

gives this :)

echo $IMS_AD_PORT
IMS_AD_PARSE_APP_ID

@dhamidi
Copy link

dhamidi commented Feb 18, 2016

build_args() {
    printf " --build-arg %s=%s" "$@"
}
sudo docker build $(build_args \
  IMS_AD_PORT $IMS_AD_PORT \
  IMS_AD_PARSE_APP_ID $IMS_AD_PARSE_APP \
  IMS_AD_PARSE_JS_KEY $IMS_AD_PARSE_JS_KEY \
  IMS_AD_AWS_SQS_QUEUE $IMS_AD_AWS_SQS_QUEUE \
) \
  -t kamoljan/ad:1.0 api

@kamoljan
Copy link
Author

oh! thank you

@kamoljan
Copy link
Author

docker run -e IMS_AD_PORT=12345 -e IMS_AD_PARSE_APP_ID=testing-app-id

and in Dockerfile:

ARG IMS_AD_PORT
ENV IMS_AD_PORT ${IMS_AD_PORT}
EXPOSE IMS_AD_PORT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment