Skip to content

Commit 7f1f0a2

Browse files
committed
full project rewrite & cleanup
1 parent e2ba15e commit 7f1f0a2

35 files changed

Lines changed: 549 additions & 755 deletions

.github/FUNDING.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/build-all.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build and Push Multiple Images
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-and-push:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
include:
12+
- variant: latest
13+
version: 1.0.0
14+
- variant: bun
15+
version: 1.2.10
16+
- variant: node
17+
version: 23.11.0
18+
- variant: php
19+
version: 8.4.6
20+
fail-fast: false
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
- name: Login to Docker Hub Registry
27+
uses: docker/login-action@v3
28+
with:
29+
username: ${{ vars.DOCKERHUB_USERNAME }}
30+
password: ${{ secrets.DOCKERHUB_TOKEN }}
31+
32+
- name: Set up QEMU
33+
uses: docker/setup-qemu-action@v3
34+
35+
- name: Set up Docker Buildx
36+
uses: docker/setup-buildx-action@v3
37+
38+
- name: Build and push
39+
uses: docker/build-push-action@v6
40+
with:
41+
push: true
42+
file: ./src/${{ matrix.variant }}/Dockerfile
43+
platforms: linux/amd64,linux/arm64
44+
build-args: |
45+
VARIANT=${{ matrix.variant }}
46+
VERSION=${{ matrix.version }}
47+
tags: |
48+
${{ vars.DOCKERHUB_USERNAME }}/devbox:${{ matrix.variant }}
49+
${{ vars.DOCKERHUB_USERNAME }}/devbox:${{ matrix.variant }}-${{ matrix.version }}

.github/workflows/build-one.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build and Push One Image
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
variant:
7+
description: "Image Variant (e.g. latest)"
8+
required: true
9+
default: "latest"
10+
version:
11+
description: "Image Version (e.g. 1.0.0)"
12+
required: true
13+
default: "1.0.0"
14+
15+
jobs:
16+
build-and-push:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Login to Docker Hub Registry
21+
uses: docker/login-action@v3
22+
with:
23+
username: ${{ vars.DOCKERHUB_USERNAME }}
24+
password: ${{ secrets.DOCKERHUB_TOKEN }}
25+
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
32+
- name: Build and push
33+
uses: docker/build-push-action@v6
34+
with:
35+
push: true
36+
file: ./src/${{ github.event.inputs.variant }}/Dockerfile
37+
platforms: linux/amd64,linux/arm64
38+
build-args: |
39+
VARIANT=${{ github.event.inputs.variant }}
40+
VERSION=${{ github.event.inputs.version }}
41+
tags: |
42+
${{ vars.DOCKERHUB_USERNAME }}/devbox:${{ github.event.inputs.variant }}
43+
${{ vars.DOCKERHUB_USERNAME }}/devbox:${{ github.event.inputs.variant }}-${{ github.event.inputs.version }}

.github/workflows/build.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfile

Lines changed: 0 additions & 24 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Ibrahim Mohamed
3+
Copyright (c) 2024 Ibrahim Megahed
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,27 @@
11
# DevBox Container
22

3-
## Description
4-
5-
This DevBox container is designed for an efficient and productive development environment. It includes a selection of essential tools and packages to facilitate various tasks. 🛠️ ✨
3+
DevContainers images based on Alpine Linux
64

75
## Usage
86

97
All variants are avilable to pull from Docker hub, just replace `latest` with the variant you need:
108

119
```bash
12-
docker pull tdim/devbox:latest
10+
docker pull codjix/devbox:latest
1311
```
1412

1513
## Variants
1614

17-
| **Tag** | **Description** |
18-
| --------------------------------------------------------------------- | ---------------------------------------------------------------- |
19-
| **[core](https://github.com/Hima-Pro/devbox/blob/main/docs/core.md)** | `Latest core` image for the development environment. |
20-
| **[node](https://github.com/Hima-Pro/devbox/blob/main/docs/node.md)** | `Node.js` image for running JavaScript applications. |
21-
| **[php](https://github.com/Hima-Pro/devbox/blob/main/docs/php.md)** | `PHP` image for building and running PHP applications. |
22-
| **go** `comming soon` | `Go` image for developing Go applications and services. |
23-
| **more** | [add your own variant](https://github.com/Hima-Pro/devbox/pulls) |
15+
| **Tag** | **Description** |
16+
| ---------- | --------------------------------------------------------------- |
17+
| **latest** | `Latest core` image for the development environment. |
18+
| **bun** | `Bun.sh` image for running JavaScript applications. |
19+
| **node** | `Node.js` image for running JavaScript applications. |
20+
| **php** | `PHP` image for building and running PHP applications. |
21+
| **more** | [Suggest a new variant](https://github.com/codjix/devbox/pulls) |
2422

2523
Please read variant's docs for more details.
2624

27-
## Build Extend
28-
29-
- [See how to build images with devbox](https://github.com/Hima-Pro/devbox/blob/main/docs/build.md)
30-
- [Extending example](https://github.com/Hima-Pro/devbox/blob/main/example)
31-
3225
## License
3326

34-
- [MIT License](https://github.com/Hima-Pro/devbox/blob/main/LICENSE)
27+
- [MIT License](./LICENSE)

build.sh

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/bash
2-
# clear
32

43
banner() {
54
echo ""
@@ -25,22 +24,17 @@ usage() {
2524
echo " -v, --version Print version"
2625
echo ""
2726
echo "Image Types:"
28-
echo " latest Build core image with main dependencies"
29-
echo " core Build core image with main dependencies"
30-
echo " node Build node image from node.Dockerfile"
31-
echo " php Build php image from php.Dockerfile"
32-
# echo " go Build go image from go.Dockerfile"
27+
echo " latest Core image."
28+
echo " bun Bun image."
29+
echo " node Node.js image."
30+
echo " php PHP image."
3331
echo ""
3432
exit 1
3533
}
3634

37-
# Default message if not provided
38-
MESSAGE="developer did not provide any changes"
39-
4035
# Parse command line options
4136
while [[ $# -gt 0 ]]; do
42-
key="$1"
43-
case $key in
37+
case "$1" in
4438
-h|--help)
4539
banner
4640
usage
@@ -61,30 +55,22 @@ if [ $# -eq 0 ]; then
6155
usage
6256
fi
6357

58+
banner
6459
# Check for the image type
6560
case "$1" in
6661
latest)
67-
banner
68-
docker buildx build -t tdim/devbox:latest -f ./Dockerfile .
62+
docker buildx build -t codjix/devbox:latest -f ./src/latest/Dockerfile .
6963
;;
70-
core)
71-
banner
72-
docker buildx build -t tdim/devbox:core -f ./Dockerfile .
64+
bun)
65+
docker buildx build -t codjix/devbox:bun -f ./src/bun/Dockerfile .
7366
;;
7467
node)
75-
banner
76-
docker buildx build -t tdim/devbox:node -f ./node.Dockerfile .
68+
docker buildx build -t codjix/devbox:node -f ./src/node/Dockerfile .
7769
;;
7870
php)
79-
banner
80-
docker buildx build -t tdim/devbox:php -f ./php.Dockerfile .
71+
docker buildx build -t codjix/devbox:php -f ./src/php/Dockerfile .
8172
;;
82-
# go)
83-
# banner
84-
# docker buildx build -t tdim/devbox:go -f ./go.Dockerfile .
85-
# ;;
8673
*)
87-
banner
8874
# Invalid image type
8975
usage "Invalid option or image type: $1"
9076
exit 1

docker-compose.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)