Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description

APNS notifier

This docker container sends a notification to an iPhone through APNS

Building the Image

To create the image cloudspace/apple-push-notifications, execute the following after pulling the image from docker:

docker build -t cloudspace/apple-push-notifications ./

Running the Image

You run the image with the docker run command. Here is an example run command. You should use the --rm option to force the container to be removed after it completes running.

docker run --rm cloudspace/apple-push-notifications /go-apns "DEVICE_TOKEN_STRING" "ALERT_TEXT_STRING" "CERTIFICATE_STRING" "NO_ENC_KEY_STRING"

Command line arguments for the go executable

run takes four argruments

  • The device token to send the alert to
  • The text to send in the alert
  • SSL certificate string literal. It is advised to \n escape newlines in the cert in a text editor prior to use.
  • Private key string literal. It is advised to \n escape newlines in the key in a text editor prior to use.


The service will return a JSON object with a result value.

  • "{'success' : 'true', 'error' : 'NONE'}"
  • "{'success' : 'false', 'error' : 'ERROR_MSG'}"

Running the Image for Troubleshooting

If you need to troubleshoot problems, you don't want your container to disappear after it finishes running. Instead of running the container with the --rm option and having it disappear after it completes it's task, you can use this command to have the container set up sshd and run it under supervisor so that you can ssh in and poke around the container, just like you would troubleshoot any other server. Change the root password of the command below or you will be using 'dogecoin'.

docker run -d -p 22 -e "root _pw=dogecoin" cloudspace/apple-push-notifications
Docker Pull Command
Source Repository