diff --git a/hero_docker/Dockerfile b/hero_docker/Dockerfile new file mode 100644 index 000000000..89eec8df3 --- /dev/null +++ b/hero_docker/Dockerfile @@ -0,0 +1,45 @@ +FROM ubuntu:latest + +# Add metadata +LABEL maintainer="FreeFlow Universe" +LABEL version="Latest" +LABEL description="Environment for Hero and Crystallib frameworks" +LABEL org.opencontainers.image.source="https://github.com/freeflowuniverse/crystallib" +LABEL org.opencontainers.image.licenses="Apache 2.0" + +ENV DEBIAN_FRONTEND=noninteractive + +# Install prerequisites +RUN apt-get update -y && \ + apt-get install -y \ + git \ + curl \ + nano \ + openssh-client \ + libsqlite3-dev \ + python3-venv && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Create directory structure +RUN mkdir -p /root/code/github/freeflowuniverse + +# Set working directory +WORKDIR /root/code/github/freeflowuniverse + +# Clone repository +RUN git clone https://github.com/freeflowuniverse/crystallib + +# Download installation scripts +RUN curl https://raw.githubusercontent.com/freeflowuniverse/crystallib/development/scripts/install_hero.sh > /tmp/hero_install.sh && \ + curl https://raw.githubusercontent.com/freeflowuniverse/crystallib/development/scripts/installer.sh > /tmp/install.sh + +# Run installation scripts +RUN bash /tmp/hero_install.sh && \ + bash /tmp/install.sh + +# Clean up +RUN rm /tmp/hero_install.sh /tmp/install.sh + +# Set default command +CMD ["/bin/bash"] \ No newline at end of file diff --git a/hero_docker/README.md b/hero_docker/README.md new file mode 100644 index 000000000..9426ff9df --- /dev/null +++ b/hero_docker/README.md @@ -0,0 +1,88 @@ +

Hero Docker Image

+ +

Table of Contents

+ +- [Introduction](#introduction) +- [Features](#features) +- [Quick Start](#quick-start) + - [Pull the Image](#pull-the-image) + - [Run the Container](#run-the-container) + - [Options Explained](#options-explained) +- [Development](#development) +- [Directory Structure](#directory-structure) +- [Publish the Image](#publish-the-image) +- [License](#license) + +--- + +## Introduction + +This Docker image provides an environment for Hero and Crystallib frameworks. + +## Features + +- Ubuntu-based environment +- Pre-installed Hero and Crystallib frameworks +- Development tools and dependencies +- Ready-to-use configuration + +## Quick Start + +### Pull the Image + +```bash +docker pull logismosis/hero:latest +``` + +### Run the Container + + +```bash +docker run -it --net=host --name=hero-container -v ~/code:/root/code logismosis/hero:latest +``` + +> Note: Make sure to have a directory at `~/code`, e.g. by running (`mkdir -p ~/code`), if you want to use the volume. + +### Options Explained + +- `-it`: Interactive terminal +- `--net=host`: Use host networking +- `--name=hero-container`: Name the container +- `-v ~/code:/root/code`: Mount local code directory + +## Development + +The container comes with: + +- Git +- Curl +- Nano editor +- SSH client +- SQLite3 development files +- Python3 virtual environment + +## Directory Structure + +Within the container, the directory structure will be as follows: + +``` +/root/code/ +└── github/ + └── freeflowuniverse/ + └── crystallib/ +``` + +## Publish the Image + +- Build the image + ``` + docker build -t your-dockerhub-username/hero:latest . + ``` +- Push both tags + ``` + sudo docker push your-dockerhub-username/hero:latest + ``` + +## License + +This project is licensed under the Apache 2.0 License. \ No newline at end of file