Skip to content

Commit a57904d

Browse files
author
Mike Potter
committed
Add expect and vim, update README.
1 parent 48f1a79 commit a57904d

File tree

2 files changed

+18
-56
lines changed

2 files changed

+18
-56
lines changed

README.md

Lines changed: 13 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,29 @@
1-
# Outrigger cli
1+
# Phase2 Docksal CLI
22

3-
> Docker image adding pa11y and other common tools to [Docksal CLI](https://github.com/docksal/service-cli).
3+
> Docker image adding common tools to [Docksal CLI](https://github.com/docksal/service-cli).
44
55
[![GitHub tag](https://img.shields.io/github/tag/phase2/docker-cli.svg)](https://github.com/phase2/docker-cli) [![Docker Stars](https://img.shields.io/docker/stars/outrigger/cli.svg)](https://hub.docker.com/r/outrigger/cli) [![Docker Pulls](https://img.shields.io/docker/pulls/outrigger/cli.svg)](https://hub.docker.com/r/outrigger/cli) [![](https://images.microbadger.com/badges/image/outrigger/cli:dev.svg)](https://microbadger.com/images/outrigger/cli:latest "Get your own image badge on microbadger.com")
66

77
This Docker image adds the following tools to the docksal/cli image:
8-
* [pa11y v5](https://github.com/pa11y/pa11y)
9-
* [puppeteer v1.2](https://github.com/puppeteer/puppeteer) (needs testing with v2.x)
8+
* kubectl
9+
* helm3
10+
* kustomize
11+
* aws cli
12+
* yq
1013
* vim
14+
* expect
1115

12-
## DockerHub Integration
16+
## Using this image
1317

14-
* To generate new images for the latest Docksal version, add a new tag off `master` like `2.12`
15-
* To enable more PHP versions like `php7.4`, go into DockerHub and add another automated build target:
16-
* Source Type: `Tag`
17-
* Source: `^[0-9.]+$`
18-
* Docker Tag: `{sourceref}-php7.4`
19-
* Dockerfile Location: `Dockerfile`
20-
* Build Context: `/`
21-
* Autobuild: On
22-
* Build Caching: Off
23-
* DockerHub has automated builds configured to watch for new [tags](https://github.com/phase2/docker-cli/tags)
24-
* It will match any tag with the pattern `[0-9.]+` basically so we can keep up with Docksal's #.## versioning format
25-
* DockerHub uses [hooks/build](hooks/build) to override the `CLI_VERSION` value with the matched tag for each of the PHP versions in the automated builds list
18+
This image can be used to directly replace the Docksal CLI image if these additional tools are needed. Simply reference `phase2/docker-cli:TAG` (or `ghcr.io/phase2/docker-cli:TAG` to pull directly from GitHub).
2619

27-
## Using pa11y with Docksal
20+
## Handling different PHP versions
2821

29-
In the project `.docksal/docksal.env` set the following:
30-
31-
```
32-
CLI_IMAGE='outrigger/cli'
33-
```
34-
35-
Then start your project with `fin start`. Once the containers have started, run
36-
the webpack-dev-server for your theme:
37-
38-
```
39-
cd THEME_PATH
40-
fin exec npm run theme
41-
```
42-
where the `theme` job is defined in `package.json` as:
43-
```
44-
scripts:
45-
"theme": "cross-env-shell NODE_ENV=development \"webpack-dev-server --config ./webpack.config.js --hot\"",
46-
```
47-
48-
This will use your webpack config and enter watch mode to recompile when changes
49-
are detected to your theme files.
50-
51-
Once the theme has compiled and the webpack-dev-server is running, execute pa11y
52-
tests via:
53-
54-
```
55-
fin exec npm run pa11y
56-
```
57-
where the `pa11y` job is defined in `package.json` as:
58-
```
59-
scripts:
60-
"pa11y": "pa11y-ci --config pa11y.js"
61-
```
22+
The GitHub actions in `.github/workflows/default.yml` define a matrix of PHP versions being generated. Update this list with any new version needed. Must ensure that the upstream Docksal CLI image is available for each version of PHP.
6223

6324
## Resources
6425

65-
* General questions on Docksal should go to the [docksal documenation](https://docs.docksal.io/)
66-
* General issues on Puppeteer should check out the [base Puppeteer image](https://hub.docker.com/r/alekzonder/puppeteer/). Note: you can follow the instructions in that README to take screenshots. Since this image is based on that, you should not need a further Docker iamge download.
67-
* [Puppeteer Github Project](https://github.com/GoogleChrome/puppeteer)
68-
* [Official Puppeteer Docker guidance](https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker)
69-
* [pa11y @ Github](https://github.com/pa11y/pa11y)
26+
* General questions on Docksal should go to the [docksal documentation](https://docs.docksal.io/)
7027

7128
## Security Reports
7229

src/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ RUN curl https://awscli.amazonaws.com/awscli-exe-linux-"$(uname -m)".zip -o "aws
3939
RUN wget https://github.com/mikefarah/yq/releases/download/v4.21.1/yq_linux_"$(dpkg --print-architecture)".tar.gz -O - |\
4040
tar xz && mv yq_linux_"$(dpkg --print-architecture)" /usr/bin/yq
4141

42+
# Install expect, vim
43+
RUN apt update && \
44+
apt-get install expect -y && \
45+
apt-get install vim -y
46+
4247
# All further commands will be performed as the docker user.
4348
USER docker
4449
SHELL ["/bin/bash", "-c"]

0 commit comments

Comments
 (0)