Skip to content

Commit 40b02f6

Browse files
committed
up readme about docker
1 parent a1fdcb8 commit 40b02f6

File tree

2 files changed

+19
-21
lines changed

2 files changed

+19
-21
lines changed

Dockerfile

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
11
FROM opensuse/tumbleweed
22

3-
RUN zypper up -y && \
4-
zypper in -y ruby podman
5-
3+
RUN zypper up -y && zypper in -y ruby podman
64
COPY . /app
75
RUN ln -s /app/exe/* /usr/bin/
86
WORKDIR /app
9-
10-
#RUN bundle config --local without development test && \
11-
# bundle config set deployment true && \
12-
# bundle install
13-
14-
#RUN mkdir -p /etc/containers
15-
#RUN cat <<'EOF' > /etc/containers/containers.conf
16-
#[engine]
17-
#cgroup_manager = "none"
18-
#runtime = "runc"
19-
#EOF
20-
21-
22-
# docker build -t omnipackage-agent .
23-
24-
# docker run --rm -it --privileged --cgroupns=host -v /run/media/oleg/c3996ce0-a379-4403-9d64-7d4c0536463f/dev/omnipackage-build/:/tmp -v /home/oleg/projects/mpz:/project omnipackage-agent omnipackage build /project

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,28 @@ Agent is responsible for building packages. It contains 2 executables:
1010

1111
## Installation
1212

13-
Use repositories provided by OmniPackage itself:
13+
Use repositories provided by OmniPackage itself:
1414

1515
https://web.omnipackage.org/oleg/omnipackage-agent
1616

1717
Or just clone this repo and run `exe/omnipackage` or `exe/omnipackage-agent` directly. Ruby 3.0 or higher required.
1818

19+
### In Docker
20+
21+
Not recommended especially in production since it requires `--privileged` flag to run containers inside.
22+
23+
To build an image run:
24+
```
25+
docker build -t omnipackage-agent .
26+
```
27+
28+
Use it to build a project:
29+
```
30+
docker run --rm -it --privileged --cgroupns=host -v /tmp/build/:/tmp -v /path/to/project:/project omnipackage-agent omnipackage build /project
31+
```
32+
33+
Change `/tmp/build/` to your desired host build directory, and `/path/to/project` to where the target project is located.
34+
1935
## Usage
2036

21-
Refer to [docs.omnipackage.org](https://docs.omnipackage.org/)
37+
Refer to [docs.omnipackage.org](https://docs.omnipackage.org/)

0 commit comments

Comments
 (0)