-
Notifications
You must be signed in to change notification settings - Fork 125
/
Dockerfile
41 lines (30 loc) · 1.23 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
ARG PANDAS_VER="2.2.3"
FROM ubuntu:jammy as app
ARG PANDAS_VER
# 'LABEL' instructions tag the image with metadata that might be important to the user
LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="pandas"
LABEL software.version="${PANDAS_VER}"
LABEL description="data analysis and manipulation tool for python"
LABEL website="https://github.com/pandas-dev/pandas"
LABEL license="https://github.com/pandas-dev/pandas?tab=BSD-3-Clause-1-ov-file#readme"
LABEL maintainer="Erin Young"
LABEL maintainer.email="[email protected]"
# 'RUN' executes code during the build
# Install dependencies via apt-get or yum if using a centos or fedora base
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir pandas==${PANDAS_VER}
# 'CMD' instructions set a default command when the container is run. This is typically 'tool --help.'
CMD [ "pip", "list" ]
# 'WORKDIR' sets working directory
WORKDIR /data
# A second FROM insruction creates a new stage
FROM app as test
# set working directory so that all test inputs & outputs are kept in /test
WORKDIR /test
RUN pip list | grep pandas
COPY test_pandas.py .