diff --git a/.github/workflows/docker-build-and-push.yml b/.github/workflows/docker-build-and-push.yml new file mode 100644 index 0000000..2c0ec3c --- /dev/null +++ b/.github/workflows/docker-build-and-push.yml @@ -0,0 +1,40 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - adv-docker-example + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ghcr.io/${{ github.repository }} + tags: latest + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: "./solutions/hello-docker" + file: "./solutions/hello-docker/Dockerfile.production" + push: true + tags: ${{ steps.meta.outputs.tags }} diff --git a/solutions/caddy/docker-compose.yml b/solutions/caddy/docker-compose.yml new file mode 100644 index 0000000..a5146dc --- /dev/null +++ b/solutions/caddy/docker-compose.yml @@ -0,0 +1,8 @@ +services: + web: + image: caddy:latest + ports: + - "2019:80" # Map port 8080 on the host to port 80 in the container + volumes: + - ./index.html:/usr/share/caddy/index.html # Mount your single index.html file + restart: always # Optional: automatically restart the service if it stops diff --git a/solutions/caddy/index.html b/solutions/caddy/index.html new file mode 100644 index 0000000..fd462b6 --- /dev/null +++ b/solutions/caddy/index.html @@ -0,0 +1,146 @@ + + + +W3.CSS Template + + + + + + + + + + +
+ + +
+ + +
+ +
+
+ Avatar +
+

Jane Doe

+
+
+
+

Designer

+

London, UK

+

ex@mail.com

+

1224435534

+
+ +

Skills

+

Adobe Photoshop

+
+
90%
+
+

Photography

+
+
+
80%
+
+
+

Illustrator

+
+
75%
+
+

Media

+
+
50%
+
+
+ +

Languages

+

English

+
+
+
+

Spanish

+
+
+
+

German

+
+
+
+
+
+

+ + +
+ + +
+ +
+

Work Experience

+
+
Front End Developer / w3schools.com
+
Jan 2015 - Current
+

Lorem ipsum dolor sit amet. Praesentium magnam consectetur vel in deserunt aspernatur est reprehenderit sunt hic. Nulla tempora soluta ea et odio, unde doloremque repellendus iure, iste.

+
+
+
+
Web Developer / something.com
+
Mar 2012 - Dec 2014
+

Consectetur adipisicing elit. Praesentium magnam consectetur vel in deserunt aspernatur est reprehenderit sunt hic. Nulla tempora soluta ea et odio, unde doloremque repellendus iure, iste.

+
+
+
+
Graphic Designer / designsomething.com
+
Jun 2010 - Mar 2012
+

Lorem ipsum dolor sit amet, consectetur adipisicing elit.


+
+
+ +
+

Education

+
+
W3Schools.com
+
Forever
+

Web Development! All I need to know in one place

+
+
+
+
London Business School
+
2013 - 2015
+

Master Degree

+
+
+
+
School of Coding
+
2010 - 2013
+

Bachelor Degree


+
+
+ + +
+ + +
+ + +
+ + + + + diff --git a/hello-docker/.dockerignore b/solutions/hello-docker/.dockerignore similarity index 100% rename from hello-docker/.dockerignore rename to solutions/hello-docker/.dockerignore diff --git a/hello-docker/Cargo.lock b/solutions/hello-docker/Cargo.lock similarity index 100% rename from hello-docker/Cargo.lock rename to solutions/hello-docker/Cargo.lock diff --git a/hello-docker/Cargo.toml b/solutions/hello-docker/Cargo.toml similarity index 100% rename from hello-docker/Cargo.toml rename to solutions/hello-docker/Cargo.toml diff --git a/hello-docker/Dockerfile.builder b/solutions/hello-docker/Dockerfile.builder similarity index 100% rename from hello-docker/Dockerfile.builder rename to solutions/hello-docker/Dockerfile.builder diff --git a/hello-docker/Dockerfile.production b/solutions/hello-docker/Dockerfile.production similarity index 100% rename from hello-docker/Dockerfile.production rename to solutions/hello-docker/Dockerfile.production diff --git a/hello-docker/Dockerfile.testing b/solutions/hello-docker/Dockerfile.testing similarity index 100% rename from hello-docker/Dockerfile.testing rename to solutions/hello-docker/Dockerfile.testing diff --git a/hello-docker/src/main.rs b/solutions/hello-docker/src/main.rs similarity index 100% rename from hello-docker/src/main.rs rename to solutions/hello-docker/src/main.rs diff --git a/solutions/minecraft/docker-compose.yml b/solutions/minecraft/docker-compose.yml new file mode 100644 index 0000000..9f12e67 --- /dev/null +++ b/solutions/minecraft/docker-compose.yml @@ -0,0 +1,14 @@ +services: + mc: + image: itzg/minecraft-server + environment: + EULA: "true" + ports: + - "25565:25565" + volumes: + - data:/data + stdin_open: true + tty: true + restart: unless-stopped +volumes: + data: {} \ No newline at end of file