Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Dockerfile #1

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

matrix:
include:
- os: osx
Expand All @@ -14,6 +15,8 @@ matrix:

before_script:
- docker pull nampdn/puskerit:latest

- pwd
- ls -las
- docker build -t vietbible/desktop --build-arg SSH_PRIVATE_KEY="$SSH_PRIVATE_KEY" .
script:
- docker run --rm nampdn/puskerit /bin/sh -c "cat puskerit"
- docker run --rm vietbible/desktop /bin/bash -c "prepare [email protected]:vgmtv/vietbible.git"
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM nampdn/puskerit:latest

ARG GIT_REPO
ARG SSH_PRIVATE_KEY
ENV GIT_REPO=$GIT_REPO
ENV SSH_PRIVATE_KEY=$SSH_PRIVATE_KEY

ADD prepare /usr/local/bin/

RUN chmod +x /usr/local/bin/prepare

RUN apk add bash

WORKDIR /usr/local/app

ENTRYPOINT ["/bin/sh"]
3 changes: 1 addition & 2 deletions prepare.sh → prepare
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H $ssh_port "$ssh_host" >> ~/.ssh/known_hosts

echo "Cloning Repo ${GIT_REPO}...."
git clone $GIT_REPO
git clone $url