Skip to content

Instantly share code, notes, and snippets.

@podhmo
Last active Feb 22, 2021
Embed
What would you like to do?
$ make
$ docker images | ioknife rest | grep foo
REPOSITORY                                                               TAG                      IMAGE ID       CREATED              SIZE
foo                                                                      0.1.0                    813317bd2068   About a minute ago   291MB
foo                                                                      0.0.0                    883eb7b407c1   17 minutes ago       320MB
FROM python:3.8-slim
RUN python3 -m pip install boto3 pandas
CMD ["python3"]
FROM python:3.8-slim as builder
WORKDIR /opt/app
COPY requirements.lock /opt/app
RUN python3 -m pip install -r requirements.lock
FROM python:3.8-slim as runner
COPY --from=builder /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
#COPY --from=builder /usr/local/bin/boto /usr/local/bin/boto
CMD ["python3"]
00:
docker build -t foo:0.0.0 .
01:
docker build -t foo:0.1.0 . -f Dockerfile.multi
boto3==1.17.12
botocore==1.20.12
jmespath==0.10.0
numpy==1.20.1
pandas==1.2.2
python-dateutil==2.8.1
pytz==2021.1
s3transfer==0.3.4
six==1.15.0
urllib3==1.26.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment