Skip to content

Commit

Permalink
Merge pull request #261 from grycap/bin-fix
Browse files Browse the repository at this point in the history
Binary fixes
  • Loading branch information
Alfonso Pérez authored Jul 19, 2018
2 parents c48acc3 + ad9baa6 commit 14c67c8
Show file tree
Hide file tree
Showing 5 changed files with 5,818 additions and 15 deletions.
21 changes: 8 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
FROM python:3.7.0-stretch
FROM ubuntu:latest

MAINTAINER @iMerica <[email protected]>

RUN apt-get update && apt-get install -y \
zip \
RUN apt-get update && apt-get install -y wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN addgroup --system scar && adduser --system --group scar

RUN git clone --branch master --depth 1 https://github.com/grycap/scar.git /usr/bin/scar && \
pip install -r /usr/bin/scar/requirements.txt
RUN addgroup --system scar && adduser --system --group scar

RUN touch /scar.log && chown scar /scar.log

ENV PYTHONUNBUFFERED=1
RUN wget https://github.com/grycap/scar/releases/download/v1.0.0/scar -O /usr/bin/scar \
&& chmod +x /usr/bin/scar

USER scar

ENTRYPOINT ["python3", "/usr/bin/scar/scar.py"]
ENV SCAR_LOG_PATH ~/

ENTRYPOINT ["/usr/bin/scar"]


4 changes: 3 additions & 1 deletion src/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

log_folder_name = ".scar"
log_file_folder = os.path.join(os.path.expanduser("~"), log_folder_name)
if 'SCAR_LOG_PATH' in os.environ:
log_file_folder = os.environ['SCAR_LOG_PATH']
log_file_name = "scar.log"
log_file_path = os.path.join(log_file_folder, log_file_name)

Expand Down Expand Up @@ -92,4 +94,4 @@ def warning_json(cli_msg, log_msg):

def error_json(cli_msg, log_msg):
print_json(cli_msg)
logging.error(log_msg)
logging.error(log_msg)
Binary file modified src/providers/aws/cloud/lambda/udockerb
Binary file not shown.
Loading

0 comments on commit 14c67c8

Please sign in to comment.