running in container instructions update
This commit is contained in:
parent
a3516b2ae9
commit
a6ac1df93d
3 changed files with 18 additions and 6 deletions
10
Dockerfile
10
Dockerfile
|
@ -2,13 +2,13 @@ FROM rust
|
||||||
|
|
||||||
WORKDIR /usr/local/src/
|
WORKDIR /usr/local/src/
|
||||||
RUN curl -s https://api.github.com/repos/y2z/monolith/releases/latest \
|
RUN curl -s https://api.github.com/repos/y2z/monolith/releases/latest \
|
||||||
| grep "tarball_url.*\"," \
|
| grep "tarball_url.*\"," \
|
||||||
| cut -d '"' -f 4 \
|
| cut -d '"' -f 4 \
|
||||||
| wget -qi - -O monolith.tar.gz
|
| wget -qi - -O monolith.tar.gz
|
||||||
|
|
||||||
RUN tar xfz monolith.tar.gz \
|
RUN tar xfz monolith.tar.gz \
|
||||||
&& mv Y2Z-monolith-* monolith \
|
&& mv Y2Z-monolith-* monolith \
|
||||||
&& rm monolith.tar.gz
|
&& rm monolith.tar.gz
|
||||||
|
|
||||||
WORKDIR /usr/local/src/monolith
|
WORKDIR /usr/local/src/monolith
|
||||||
RUN ls -a
|
RUN ls -a
|
||||||
|
|
|
@ -47,7 +47,9 @@ Dependency: `libssl-dev`
|
||||||
$ make install
|
$ make install
|
||||||
|
|
||||||
#### Using Containers
|
#### Using Containers
|
||||||
The guide can be found [here](docs/containers.md)
|
|
||||||
|
$ docker build -t Y2Z/monolith .
|
||||||
|
$ sudo install -b utils/run-in-container.sh /usr/local/bin/monolith
|
||||||
|
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
|
|
||||||
|
|
10
utils/run-in-container.sh
Normal file
10
utils/run-in-container.sh
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
DOCKER=docker
|
||||||
|
PROG_NAME=monolith
|
||||||
|
|
||||||
|
if which podman 2>&1 > /dev/null; then
|
||||||
|
DOCKER=podman
|
||||||
|
fi
|
||||||
|
|
||||||
|
$DOCKER run --rm Y2Z/$PROG_NAME $PROG_NAME "$@"
|
Loading…
Reference in a new issue