-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
37 lines (27 loc) · 1.11 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
FROM ubuntu:latest
# MAINTAINER is deprecated, but I don't know how else to set the `AUTHOR` metadata
MAINTAINER [email protected]
# Labels.
LABEL maintainer="[email protected]"
# https://medium.com/@chamilad/lets-make-your-docker-image-better-than-90-of-existing-ones-8b1e5de950d
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.name="besapi"
LABEL org.label-schema.description="Run besapi REST API CLI for BigFix on Ubuntu:latest"
LABEL org.label-schema.docker.cmd="docker run --rm -it besapi"
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/
RUN apt-get update && apt-get install -y curl git python3 python3-pip && rm -rf /var/lib/apt/lists/*
WORKDIR /tmp
# install requirements
COPY requirements.txt /tmp/
RUN pip3 install --requirement requirements.txt --quiet
RUN rm -f /tmp/requirements.txt
COPY . /tmp/besapi
WORKDIR /tmp/besapi
RUN python3 ./tests/tests.py
WORKDIR /tmp/besapi/src
# ENTRYPOINT [ "/bin/bash" ]
CMD [ "python3", "-m", "besapi" ]
# Interactive:
# docker run --rm -it --entrypoint bash besapi
# Run recipe from within Interactive shell
# python3 -m besapi