Skip to content
This repository was archived by the owner on Apr 13, 2022. It is now read-only.

Commit 7eaaf10

Browse files
committed
use the new secman v2 for secman docker images
1 parent 2f77f2a commit 7eaaf10

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

Makefile

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,7 @@
22

33
build : sm_cli sm_container
44

5-
define pull_secman
6-
@cd cli && \
7-
wget https://docker.secman.dev/secman && \
8-
chmod 755 secman
9-
endef
10-
11-
pull:
12-
$(call pull_secman)
13-
145
sm_cli:
15-
$(call pull_secman)
16-
176
@cd cli && \
187
docker build -t smcr/secman-cli . && \
198
docker push smcr/secman-cli

cli/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ FROM debian
55
### begin ###
66

77
RUN apt-get update -y && apt-get upgrade -y
8+
RUN apt-get install -y npm nodejs
9+
RUN apt-get install -y curl sudo wget
810

911
# run `make pull_secman` before this step
10-
COPY secman /bin/secman
12+
RUN npm i -g secman
13+
RUN secman init
1114

12-
ENTRYPOINT ["/bin/secman"]
15+
ENTRYPOINT ["secman"]
1316

1417
### end ###

container/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,20 @@ RUN $UPD && $INS -y sudo && \
3232
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
3333

3434
### nodejs & npm ###
35-
RUN curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh && \
35+
RUN curl -sL https://deb.nodesource.com/setup_17.x -o nodesource_setup.sh && \
3636
sudo bash nodesource_setup.sh && \
3737
$INS_s nodejs build-essential -y && \
3838
sudo rm -rf nodesource_setup.sh && \
3939
$UPD_s
40+
RUN npm i -g npm@latest
4041

4142
ENV HOME="/home/secman_yo"
4243
WORKDIR $HOME
4344
USER secman_yo
4445

4546
### secman ###
46-
RUN curl -fsSL https://unix.secman.dev | bash
47+
RUN sudo npm i -g secman
48+
RUN secman init
4749

4850
### zsh ###
4951
ENV src=".zshrc"

0 commit comments

Comments
 (0)