-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
68 lines (45 loc) · 1.77 KB
/
Copy pathDockerfile
File metadata and controls
68 lines (45 loc) · 1.77 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM python:3
WORKDIR /usr/src/app
# RUN apt-get update && apt-get install -y jq
# RUN apt-get update && apt-get install -y bat
# Install dependencies before COPY of requirements.txt && before COPY of app
RUN apt-get update && apt-get install -y jq && apt-get clean && rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# 1 - Run script and die
# 2 -
# 3 - Start. Sit. Do nothing. Wait for `docker exec` command
# Mike's preference....
CMD [ "python", "src/refactoring_recognizer.py" ]
# Garbage.... snippets-of-purported-gold-but-aged-and-unnecessary
#
# Mike said this...
# Cannot copy ../....
# The container is rooted at project directory. There is nothing above it.
# I am coming in as src/.., but there is no src/../..
# How To Build
# Original
# ARG openaiapikeythingy
# ENV OPENAI_API_KEY $openaiapikeythingy
# docker build . -t mrw/commit-message-generator --build-arg openaiapikeythingy=$OPENAI_API_KEY
# git diff | docker run -i mrw/commit-message-generator
# Newer/cleaner...
# docker build . -t mrw/commit-message-generator
# git diff | docker run -i -e "OPENAI_API_KEY=$OPENAI_API_KEY" mrw/commit-message-generator
# docker run -i -t -e "OPENAI_API_KEY=$OPENAI_API_KEY" mrw/commit-message-generator /bin/bash
# -i interactive stdin<->stdin/
# TODO
# - Set up docker account mrw////....
# Find free one. Get login.
# `docker login user password` pseudocode
#
# `docker tag mrw/com...:latest mrw/comm..:1`
# - I publish this
# - `docker push mrw/commit-message-generator:1`
# - `docker push mrw/commit-message-generator:latest`
# - User installs/gets this
# - `docker pull mrw:\commi:latest`
# - `git diff | docker ....`
# TODL
# Change "/" to ":" in mrw/... as naming. Image names vs Container name.