Skip to content

Commit

Permalink
Merge pull request #1 from baleyko/feat/flexible-entrypoint
Browse files Browse the repository at this point in the history
Add ability to run another binary
  • Loading branch information
baleyko authored May 27, 2020
2 parents 4f7cc48 + 506a083 commit 71f8b50
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
.github
.dockerignore
Dockerfile
*.md
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.1.1 (May 27, 2020)

- Add ability to run another binary via the [Docker](https://www.docker.com/) image entrypoint

## 0.1.0 (May 27, 2020)

- Install Deno inside the [Docker](https://www.docker.com/) image
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ RUN apt update -yqq \
&& apt -yqq autoremove \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/usr/local/bin/deno"]
ADD . .
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["deno"]
8 changes: 8 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e

if [ "${1#-}" != "$1" ] || [ -z "$(command -v "${1}")" ]; then
set -- deno "$@"
fi

exec "$@"

0 comments on commit 71f8b50

Please sign in to comment.