Skip to content

Commit

Permalink
Fix ShellSpec install process.
Browse files Browse the repository at this point in the history
Because ShellSpec could not be installed using the installer in the Docker environment,
I changed to the installation method using git clone and Makefile.
  • Loading branch information
nao1215 committed Nov 29, 2021
1 parent 89e04e1 commit d815261
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 25 deletions.
18 changes: 8 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@ FROM golang as builder
ENV ROOT=/go/app
WORKDIR ${ROOT}

# 1) Install package for setup
# 2) Install mimixbox
# 3) Create mimixbox symbolic link in container.
# 4) Setting root user password
# 5) Add mimixbox user
# 6) Setting mimixbox user password
RUN apt-get update && apt-get install -y expect && \
go install github.com/nao1215/mimixbox/cmd/mimixbox@latest && \
# 1) Install mimixbox
# 2) Create mimixbox symbolic link in container.
# 3) Setting root user password
# 4) Add mimixbox user
# 5) Setting mimixbox user password
RUN go install github.com/nao1215/mimixbox/cmd/mimixbox@latest && \
mimixbox --full-install /usr/local/bin/
RUN echo 'root:password' | chpasswd
RUN useradd mimixbox -m -s /bin/bash &&\
echo 'mimixbox:password' |chpasswd

# Copy ShellSpec installer
COPY ./scripts/installShellSpec.sh /home/mimixbox
RUN /home/mimixbox/installShellSpec.sh && rm /home/mimixbox/install*.sh
COPY ./scripts/installShellSpecForDocker.sh .
RUN ./installShellSpecForDocker.sh

# If you want to administrator privileges, you become the root user.
# RUN echo "mimixbox ALL=(ALL) ALL" >> /etc/sudoers
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The table below shows the tools used when developing the commands in the mimixbo
| pandoc | Convert markdown files to manpages |
| make | Used for build, run, test, etc |
| gzip | Used for compress man pages |
| expect | Used for install ShellSpec in Docker|
| curl | Used for install ShellSpec |
| install | Used for install serial binary and document in the system |
| docker| Used for testing Mimixbox inside Docker|
| debootstrap| Used for testing Mimixbox inside jail envrioment|
Expand All @@ -34,9 +34,9 @@ The table below shows the tools used when developing the commands in the mimixbo
If you use Debian-based distribution (e.g. Debian/Ubuntu/Kali Linux/Raspberry Pi OS), You can install tools with the following command.

```
$ sudo apt install build-essential wget expect git pandoc gzip expect docker.io debootstrap
$ sudo apt install build-essential curl git pandoc gzip docker.io debootstrap
$ go install github.com/google/go-licenses@latest
$ curl -fsSL https://git.io/shellspec | sh
$ curl -fsSL https://git.io/shellspec | sh -s -- --yes
```

### How to build
Expand Down
12 changes: 0 additions & 12 deletions scripts/installShellSpec.sh

This file was deleted.

5 changes: 5 additions & 0 deletions scripts/installShellSpecForDocker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -eu

git clone https://github.com/shellspec/shellspec.git
cd shellspec
make install

0 comments on commit d815261

Please sign in to comment.