Skip to content

Commit

Permalink
Merge pull request #28 from lhh/container_build
Browse files Browse the repository at this point in the history
Add container build option (experimental)
  • Loading branch information
lhh authored Jan 25, 2024
2 parents 9860322 + bcc3512 commit cea66fe
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM fedora:latest

COPY . jirate
RUN cd jirate && dnf -y install python3-pip nano && pip install --user -r requirements.txt .

# TODO: Switch to venv

ENTRYPOINT ["/root/.local/bin/jirate"]
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
all: container-build jirate-c

container-build:
podman images | grep '^localhost/jirate' && echo "Please remove existing image: podman image rm localhost/jirate" && false
podman build . -t jirate

jirate-c: jirate-c.in
cat $^ > $@
chmod +x $@

clean:
# Note: doesn't destroy the container image
rm -f jirate-c
3 changes: 3 additions & 0 deletions jirate-c.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
podman images | grep -q '^localhost/jirate' || exit 1
podman run -it --rm --mount type=bind,src=$HOME/.jirate.json,dst=/root/.jirate.json,ro,relabel=shared jirate $*

0 comments on commit cea66fe

Please sign in to comment.