Skip to content

Commit

Permalink
Use Podman for building
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Bernoth <[email protected]>
  • Loading branch information
rhdojun authored and haircommander committed Aug 5, 2020
1 parent fe1563c commit 5a6b2ac
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM registry.fedoraproject.org/fedora:latest

RUN sudo dnf install -y make automake gcc gcc-c++ kernel-devel glib2-devel && \
sudo dnf clean all && \
rm -rf /var/cache/dnf

RUN sudo dnf update -y && \
sudo dnf clean all && \
rm -rf /var/cache/dnf

# replaces the mktemp from the tutorial as everything is temporary in a
# container unless bind mounted out
RUN mkdir -p /tmp/gocache
ENV GOCACHE=/tmp/gocache

RUN mkdir -p /devenv
ADD . /devenv
WORKDIR /devenv

RUN make
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,13 @@ fmt:
find . '(' -name '*.h' -o -name '*.c' ! -path './vendor/*' ')' -exec clang-format -i {} \+
find . -name '*.go' ! -path './vendor/*' -exec gofmt -s -w {} \+
git diff --exit-code


.PHONY: dbuild
dbuild:
-mkdir -p bin
-podman rm conmon-devenv
podman build -t conmon-devenv:latest .
podman create --name conmon-devenv conmon-devenv:latest
podman cp conmon-devenv:/devenv/bin/conmon bin/conmon
@echo "for installation move conmon file to /usr/local/libexec/podman/"

0 comments on commit 5a6b2ac

Please sign in to comment.