-
Notifications
You must be signed in to change notification settings - Fork 34
/
Dockerfile
39 lines (31 loc) · 894 Bytes
/
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
# docker build . [--build-arg editor_packages=neovim] -t sncli
# docker run --rm -it -v /tmp:/tmp -v "$HOME/.sncli/:/root/.sncli/" -v "$HOME/.snclirc:/root/.snclirc" sncli
ARG python_version="3.9"
FROM python:${python_version}-bullseye
ARG editor_packages="vim"
ARG pager_packages="less"
ARG locale="en_US.UTF-8"
ARG charset="UTF-8"
# Install editors and tools of your choice
ARG DEBIAN_FRONTEND=noninteractive
RUN \
apt-get update && \
apt-get install -y \
${editor_packages} \
${pager_packages} \
locales \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/
RUN \
echo "${locale} ${charset}" | tee /etc/locale.gen \
&& locale-gen
RUN pip3 install --no-cache pipenv
COPY ./Pipfile /sncli/
COPY ./Pipfile.lock /sncli/
WORKDIR /sncli/
RUN \
pipenv install && \
pipenv --clear
COPY . /sncli/
ENTRYPOINT [ "pipenv", "run", "./sncli" ]