mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
init commit
This commit is contained in:
commit
b6a9a32c0b
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[submodule "idonethis/src"]
|
||||
path = idonethis/src
|
||||
url = git@github.com:influitive/idonethis.git
|
2
idonethis/.idonethisrc
Normal file
2
idonethis/.idonethisrc
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
sender: GmailSender
|
15
idonethis/Dockerfile
Normal file
15
idonethis/Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
|||
FROM ruby:1.9.3-p547
|
||||
MAINTAINER Jessica Frazelle <jess@docker.com>
|
||||
|
||||
# update gems
|
||||
RUN gem update --system
|
||||
RUN gem update
|
||||
|
||||
# install idonethis from git
|
||||
COPY src/ /idonethis
|
||||
RUN cd /idonethis; rake build; gem install /idonethis/pkg/idonethis-0.1.0.gem;
|
||||
|
||||
COPY .idonethisrc /
|
||||
COPY main.sh /
|
||||
|
||||
ENTRYPOINT ["/main.sh"]
|
33
idonethis/main.sh
Executable file
33
idonethis/main.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
# main entry point to run idonethis
|
||||
|
||||
function checkvars() {
|
||||
if [[ -z "${IDT_USERNAME}" ]]; then
|
||||
echo "ERROR: The environment variable IDT_USERNAME is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "${IDT_PASSWORD}" ]]; then
|
||||
echo "ERROR: The environment variable IDT_PASSWORD is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "${IDT_ADDRESS}" ]]; then
|
||||
echo "ERROR: The environment variable IDT_ADDRESS is not set."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function main() {
|
||||
checkvars
|
||||
|
||||
cat <<EOT >> /.idonethisrc
|
||||
username: $IDT_USERNAME
|
||||
password: $IDT_PASSWORD
|
||||
idonethis_address: $IDT_ADDRESS
|
||||
EOT
|
||||
}
|
||||
|
||||
main
|
||||
echo "Sending message: '$@'"
|
||||
idonethis "$@"
|
1
idonethis/src
Submodule
1
idonethis/src
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 022072cac6ded1d55bc30415022dd3bf8ad937fc
|
Loading…
Reference in New Issue
Block a user