Skip to content

Commit

Permalink
feat: adds basic container for running cli
Browse files Browse the repository at this point in the history
initial thoughts on how i can run the cli and tui in a container
this goes in line with publishing brew packages

refs #33
  • Loading branch information
devraj committed Jul 30, 2024
1 parent e9607c1 commit a3cacf2
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Use an official Python runtime based on Debian 12 "bookworm" as a parent image.
FROM python:3.12-slim-bookworm

# Install system packages required by Wagtail and Django.
RUN apt-get update --yes --quiet && apt-get install --yes --quiet --no-install-recommends \
build-essential \
libpq-dev \
postgresql-client \
curl \
libjpeg62-turbo-dev \
zlib1g-dev \
libwebp-dev \
libpango-1.0-0 \
libpangoft2-1.0-0 \
&& rm -rf /var/lib/apt/lists/*


# Install task from their servers, not this requires curl
# so you must only have this tkas post the apt updates
RUN sh -c "$(curl --location https://taskfile.dev/install.sh)" \
-- -d -b /usr/local/bin

WORKDIR /opt
COPY Taskfile.yml Taskfile.yml
COPY poetry.lock poetry.lock
COPY pyproject.toml pyproject.toml

# Ask poetry to install all packages including the app
# not in virtual machine as we are in a container
# In prodduction add --no-dev to poetry installation
RUN pip3 install --upgrade pip
RUN pip3 install poetry
RUN poetry config virtualenvs.create false
RUN poetry install --no-root

# Copy the files in the src directory which is the app package
# and the dependency matrix dedescribed by pyproject.toml
WORKDIR /opt/${PROJ_NAME}

# Run the CLI
ENTRYPOINT [ "gala" ]

0 comments on commit a3cacf2

Please sign in to comment.