Skip to content

Ensure rsync available in image #101

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.env
lambda-deploy.zip
lambda-layer-deploy.zip
.DS_Store
.DS_Store
lambda/*
python/lambda/*
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ RUN \
./config shared --prefix=${PREFIX}/openssl --openssldir=${PREFIX}/openssl; \
make depend; make install; cd ..; rm -rf openssl

# rsync is required by bin/package.sh, so install it here
RUN \
yum install -y rsync


# Copy shell scripts and config files over
COPY bin/* /usr/local/bin/
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
build:
./build-and-test.sh

clean:
-rm -rf lambda/
-rm lambda-deploy.zip
-rm python/lambda-deploy.zip
git ls-files -o python/lambda | while read f; do rm -- "$$f"; done
5 changes: 3 additions & 2 deletions build-and-test.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash

set -e
VERSION=$(cat VERSION)

INTERACTIVE=$(if test -t 0; then echo -i; fi)
docker build . -t developmentseed/geolambda:${VERSION}
docker run --rm -v $PWD:/home/geolambda -it developmentseed/geolambda:${VERSION} package.sh
docker run --rm -v $PWD:/home/geolambda ${INTERACTIVE} -t developmentseed/geolambda:${VERSION} package.sh

cd python
docker build . --build-arg VERSION=${VERSION} -t developmentseed/geolambda:${VERSION}-python
Expand Down