Skip to content

Commit 61dcd7b

Browse files
committed
Fixing docker image with missing twofish lib
1 parent 4be8e44 commit 61dcd7b

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

Dockerfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,20 @@ COPY ecs_files_composer /opt/ecs_files_composer
1010
COPY poetry.lock pyproject.toml MANIFEST.in README.rst LICENSE /opt/
1111
RUN yum install gcc -y
1212
RUN python -m pip install pip -U; python -m pip install poetry; poetry build
13-
RUN pip install wheel --no-cache-dir && pip install dist/*.whl --no-cache-dir -t /opt/venv
14-
RUN find /opt/venv -type d -name "*pycache*" | xargs -i -P10 rm -rf {}
13+
RUN #pip install wheel --no-cache-dir && pip install dist/*.whl --no-cache-dir -t /opt/venv
14+
#RUN find /opt/venv -type d -name "*pycache*" | xargs -i -P10 rm -rf {}
1515

1616
FROM $BASE_IMAGE
1717

18-
COPY --from=builder /opt/venv ${LAMBDA_TASK_ROOT:-/app/}/venv
19-
ENV PYTHONPATH /app/venv:$PYTHONPATH
20-
ENV LD_LIBRARY_PATH=/app/venv:$LD_LIBRARY_PATH
21-
ENV PATH /app/venv/bin:$PATH
18+
COPY --from=builder /opt/dist/*.whl ${LAMBDA_TASK_ROOT:-/app/}/dist/
19+
RUN apt-get update; apt-get install gcc -y; \
20+
python -m pip install pip -U --no-cache-dir; \
21+
python -m pip install /app/dist/*.whl ;\
22+
apt-get purge gcc -y; \
23+
sudo apt-get --purge autoremove;\
24+
apt-get autoremove --yes ; \
25+
apt-get clean autoclean ; \
26+
rm -rf /var/lib/{apt,dpkg,cache,log}/
2227
WORKDIR /
2328
ENTRYPOINT ["python", "-m", "ecs_files_composer.cli"]
2429
CMD ["-h"]

0 commit comments

Comments
 (0)