Skip to content

Commit

Permalink
Add/Change: Add Oracle WebLogic Server images. Minor markdown improve…
Browse files Browse the repository at this point in the history
…ments. (#60)
  • Loading branch information
cfi-gb authored Nov 7, 2024
1 parent bc7dd18 commit 731ac63
Show file tree
Hide file tree
Showing 7 changed files with 250 additions and 109 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
include:
- CONTEXT: applications/home-assistant
TAG: "2023.5.2"
- CONTEXT: applications/oracle-weblogic/12.2.1.3-2018
TAG: "12.2.1.3-2018"
- CONTEXT: applications/oracle-weblogic/10.3.6.0-2017
TAG: "10.3.6.0-2017"
- CONTEXT: operating_systems/almalinux
TAG: "8.4"
- CONTEXT: operating_systems/almalinux
Expand Down
236 changes: 127 additions & 109 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
![Greenbone Logo](https://www.greenbone.net/wp-content/uploads/gb_new-logo_horizontal_rgb_small.png)

# vt-test-environments

This repository holds environments for VT testing. Do _not_ use them in production!

Each image comes with a pre-installed SSH server and a demo account (both name and password are "demo"). This unified behavior of different operating systems and applications enables a VT developer to deploy a clean test environment within seconds.

For questions regarding this repository, please consult the [Greenbone Community Forum](https://forum.greenbone.net/).

## Usage
## General usage

Run `docker run --rm -d -p 2222:22 --name target ghcr.io/greenbone/vt-test-environments/mageia:8`. The container is then running, SSH is exposed on port 2222 on the local machine and is ready to be scanned:

```
# ssh demo@localhost -p 2222
Password:
Expand All @@ -17,137 +20,152 @@ NAME="Mageia"
VERSION="8"
[...]
```

However, please use `docker exec -it target bash` preferrebly to interact with the container, because SSH might not be possible e.g. for very old images with no matching key exchange algorithm or requires removing the fingerprint of previously used containers from your known hosts file.

When done, the container can be stopped with `docker stop target`.

## Available images & tags
- Generic (needs to be built manually, see [applications/generic](applications/generic/))

### Applications

- Generic (needs to be built manually, see [applications/generic/README.md](applications/generic/README.md))
- [Home Assistant](https://ghcr.io/greenbone/vt-test-environments/home-assistant) (`home-assistant`, run with `--network host`, when requiring e.g. mDNS capabilities)
- `2023.5.2`
- `2023.5.2`
- [Oracle WebLogic Server](https://ghcr.io/greenbone/vt-test-environments/oracle-weblogic) (`oracle-weblogic`)
- `12.2.1.3-2018` (Image based on `Oracle Linux Server 7.4`)
- `10.3.6.0-2017` (Image based on `Ubuntu 14.04.4 LTS`)
- See [applications/oracle-weblogic/README.md](applications/oracle-weblogic/README.md) for more background info and usage

### Operating Systems

- [AlmaLinux](https://ghcr.io/greenbone/vt-test-environments/almalinux) (`almalinux`)
- `8.4`
- `8.5`
- `8.6`
- `8.7`
- `9.0`
- `9.1`
- `9.2`
- `9.3`
- `9.4`
- `8.4`
- `8.5`
- `8.6`
- `8.7`
- `9.0`
- `9.1`
- `9.2`
- `9.3`
- `9.4`
- [Amazon Linux](https://ghcr.io/greenbone/vt-test-environments/amazonlinux) (`amazonlinux`)
- `1`
- `2`
- `2022`
- `2023`
- `1`
- `2`
- `2022`
- `2023`
- [Debian](https://ghcr.io/greenbone/vt-test-environments/debian) (`debian`)
- `woody`
- `sarge`
- `etch`
- `lenny`
- `squeeze`
- `wheezy`
- `jessie`
- `stretch`
- `buster`
- `bullseye`
- `bookworm`
- `trixie`
- `woody`
- `sarge`
- `etch`
- `lenny`
- `squeeze`
- `wheezy`
- `jessie`
- `stretch`
- `buster`
- `bullseye`
- `bookworm`
- `trixie`
- [EulerOS](https://ghcr.io/greenbone/vt-test-environments/euleros) (`euleros`)
- `2.0`
- `2.1`
- `2.2`
- `2.3`
- `2.5`
- `2.9`
- `2.10`
- `2.0`
- `2.1`
- `2.2`
- `2.3`
- `2.5`
- `2.9`
- `2.10`
- [Fedora](https://ghcr.io/greenbone/vt-test-environments/fedora) (`fedora`)
- `39`
- `40`
- `39`
- `40`
- [Mageia](https://ghcr.io/greenbone/vt-test-environments/mageia) (`mageia`)
- `7`
- `8`
- `9`
- `7`
- `8`
- `9`
- [openEuler](https://ghcr.io/greenbone/vt-test-environments/openeuler) (`openeuler`)
- `22.03-lts`
- `22.03-lts-sp1`
- `22.03-lts-sp2`
- `22.03-lts-sp3`
- `22.03-lts-sp4`
- `23.03`
- `23.09`
- `24.03-lts`
- `22.03-lts`
- `22.03-lts-sp1`
- `22.03-lts-sp2`
- `22.03-lts-sp3`
- `22.03-lts-sp4`
- `23.03`
- `23.09`
- `24.03-lts`
- [Oracle Linux](https://ghcr.io/greenbone/vt-test-environments/oraclelinux) (`oraclelinux`)
- `5`
- `6`
- `7`
- `8`
- `9`
- `5`
- `6`
- `7`
- `8`
- `9`
- [Red Hat Enterprise Linux](https://ghcr.io/greenbone/vt-test-environments/rhel) (`rhel`)
- `7.6`
- `7.7`
- `7.8`
- `7.9`
- `8.0`
- `8.1`
- `8.2`
- `8.3`
- `8.4`
- `8.5`
- `8.6`
- `8.7`
- `9.0.0`
- `9.1.0`
- `7.6`
- `7.7`
- `7.8`
- `7.9`
- `8.0`
- `8.1`
- `8.2`
- `8.3`
- `8.4`
- `8.5`
- `8.6`
- `8.7`
- `9.0.0`
- `9.1.0`
- [Rocky Linux](https://ghcr.io/greenbone/vt-test-environments/rockylinux) (`rockylinux`)
- `8.5`
- `8.6`
- `8.7`
- `8.8`
- `9.0`
- `9.1`
- `9.2`
- `8.5`
- `8.6`
- `8.7`
- `8.8`
- `9.0`
- `9.1`
- `9.2`
- [Slackware](https://ghcr.io/greenbone/vt-test-environments/slackware) (`slackware`)
- `13.0`
- `13.37`
- `14.0`
- `14.1`
- `14.2`
- `15.0`
- `current` (15.0+ at the moment)
- `13.0`
- `13.37`
- `14.0`
- `14.1`
- `14.2`
- `15.0`
- `current` (15.0+ at the moment)
- [Ubuntu](https://ghcr.io/greenbone/vt-test-environments/ubuntu) (`ubuntu`)
- `10.04` (LTS, Lucid Lynx)
- `12.04` (LTS, Precise Pangolin)
- `12.10` (Quantal Quetzal)
- `13.04` (Raring Ringtail)
- `13.10` (Saucy Salamander)
- `14.04` (LTS, Trusty Tahr)
- `14.10` (Utopic Unicorn)
- `15.04` (Vivid Vervet)
- `15.10` (Wily Werewolf)
- `16.04` (LTS, Xenial Xerus)
- `16.10` (Yakkety Yak)
- `17.04` (Zesty Zapus)
- `17.10` (Artful Aardvark)
- `18.04` (LTS, Bionic Beaver)
- `18.10` (Cosmic Cuttlefish)
- `19.04` (Disco Dingo)
- `19.10` (Eoan Ermine)
- `20.04` (LTS, Focal Fossa)
- `20.10` (Groovy Gorilla)
- `21.04` (Hirsute Hippo)
- `21.10` (Impish Indri)
- `22.04` (LTS, Jammy Jellyfish)
- `22.10` (Kinetic Kudu)
- `23.04` (Lunar Lobster)
- `23.10` (Mantic Minotaur)
- `24.04` (Noble Numbat)

## Build
- `10.04` (LTS, Lucid Lynx)
- `12.04` (LTS, Precise Pangolin)
- `12.10` (Quantal Quetzal)
- `13.04` (Raring Ringtail)
- `13.10` (Saucy Salamander)
- `14.04` (LTS, Trusty Tahr)
- `14.10` (Utopic Unicorn)
- `15.04` (Vivid Vervet)
- `15.10` (Wily Werewolf)
- `16.04` (LTS, Xenial Xerus)
- `16.10` (Yakkety Yak)
- `17.04` (Zesty Zapus)
- `17.10` (Artful Aardvark)
- `18.04` (LTS, Bionic Beaver)
- `18.10` (Cosmic Cuttlefish)
- `19.04` (Disco Dingo)
- `19.10` (Eoan Ermine)
- `20.04` (LTS, Focal Fossa)
- `20.10` (Groovy Gorilla)
- `21.04` (Hirsute Hippo)
- `21.10` (Impish Indri)
- `22.04` (LTS, Jammy Jellyfish)
- `22.10` (Kinetic Kudu)
- `23.04` (Lunar Lobster)
- `23.10` (Mantic Minotaur)
- `24.04` (Noble Numbat)

#### Build

To build e.g. the image for Mageia 8 use:

```
docker build operating_systems/mageia --build-arg=TAG=8 -t mageia:8
```

If not specified otherwise, the image will be built with its packages explicitly updated. This is available for most images. To build the image for Oracle Linux 5 (non-updated) use:

```
docker build operating_systems/oraclelinux --build-arg=TAG=5 --build-arg=UPDATED=false -t oraclelinux:5
```
26 changes: 26 additions & 0 deletions applications/oracle-weblogic/10.3.6.0-2017/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ARG BASEIMAGE=vulhub/weblogic
ARG TAG=10.3.6.0-2017

FROM ${BASEIMAGE}:${TAG}
ARG UPDATED=true

ENV DEBIAN_FRONTEND=noninteractive
RUN ( \
apt-get update \
|| \
# If update fails, the release is likely EOL, so use the old-releases repo instead
if [ $? = 100 ]; then sed -i "s/security\|archive/old-releases/" /etc/apt/sources.list && apt-get update; fi \
) \
&& if [ "$UPDATED" = true ]; then apt-get upgrade -y; fi \
&& apt-get install -y openssh-server \
&& rm -rf /var/lib/apt/lists/* \
&& useradd demo \
&& echo "demo:demo" | chpasswd \
&& mkdir -p /var/run/sshd/

COPY init.sh /bin/init.sh

CMD [ "/bin/init.sh" ]

EXPOSE 22
EXPOSE 7001
5 changes: 5 additions & 0 deletions applications/oracle-weblogic/10.3.6.0-2017/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

/usr/sbin/sshd -D &
startWebLogic.sh
wait
23 changes: 23 additions & 0 deletions applications/oracle-weblogic/12.2.1.3-2018/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ARG BASEIMAGE=vulhub/weblogic
ARG TAG=12.2.1.3-2018

FROM ${BASEIMAGE}:${TAG}
ARG UPDATED=true

USER root

RUN if [ "$UPDATED" = true ]; then yum upgrade -y; fi \
&& yum install -y passwd openssh-server \
&& yum clean all \
&& useradd demo \
&& echo "demo" | passwd --stdin demo \
&& ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N "" \
&& (ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N "" || true) \
&& (ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "" || true)

COPY init.sh /bin/init.sh

CMD [ "/bin/init.sh" ]

EXPOSE 22
EXPOSE 7001
5 changes: 5 additions & 0 deletions applications/oracle-weblogic/12.2.1.3-2018/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

/usr/sbin/sshd -D &
/u01/oracle/createAndStartEmptyDomain.sh
wait
Loading

0 comments on commit 731ac63

Please sign in to comment.