Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM alpine AS build | ||
|
||
RUN apk add --no-cache --virtual=.build gcc libc-dev make bison flex readline-dev libxml2-dev git automake autoconf libtool pkgconf coreutils | ||
COPY . /augeas | ||
RUN set -ex ; \ | ||
cd augeas \ | ||
&& ./autogen.sh --prefix=/opt/augeas \ | ||
&& make \ | ||
&& make install | ||
|
||
FROM alpine | ||
RUN apk add --no-cache libgcc libxml2 readline bash | ||
COPY --from=build /opt/augeas /opt/augeas | ||
ENV PATH=$PATH:/opt/augeas/bin | ||
RUN set -x ; \ | ||
cd /opt/augeas/bin \ | ||
&& for TOOL in augcheck auggrep augload augloadone augparsediff augsed ; \ | ||
do \ | ||
wget https://raw.githubusercontent.com/raphink/augeas-sandbox/master/"$TOOL" ; \ | ||
chmod +x "$TOOL" ; \ | ||
done | ||
CMD augtool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Building the image | ||
------------------ | ||
|
||
First clone augeas repository then, build the image: | ||
|
||
```shell | ||
git clone https://github.com/hercules-team/augeas.git | ||
cd augeas | ||
docker build -t augeas -f docker/Dockerfile . | ||
``` | ||
|
||
Using the image | ||
--------------- | ||
|
||
Here is an exemple to print ssh configuration: | ||
|
||
```shell | ||
docker container run -ti --rm -v /etc/ssh/:/etc/ssh augeas augtool print /files/etc/ssh | ||
``` |