Skip to content

Commit

Permalink
Completed the build out (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyb3r-Jak3 authored May 22, 2021
1 parent 2acbfce commit 3ebc123
Show file tree
Hide file tree
Showing 8 changed files with 503 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git**
Readme.md
LICENSE
38 changes: 38 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
assignees:
- "Cyb3r-Jak3"
labels:
- "dependencies"
reviewers:
- "Cyb3r-Jak3"
commit-message:
prefix: "Docker Update"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
assignees:
- "Cyb3r-Jak3"
labels:
- "dependencies"
reviewers:
- "Cyb3r-Jak3"
commit-message:
prefix: "Action Update"
- package-ecosystem: "pip"
directory: "/"
labels:
- "dependencies"
schedule:
interval: "weekly"
assignees:
- "Cyb3r-Jak3"
commit-message:
prefix: "Pip Update"
reviewers:
- "Cyb3r-Jak3"
45 changes: 45 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Docker

on:
push:


jobs:
Docker:
runs-on: ubuntu-latest
steps:

- name: Login to Docker
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login --username ${{ secrets.DOCKER_USERNAME }} --password-stdin

- name: Login To GitHub
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin

- name: Login To GitLab
run: echo ${{ secrets.GITLAB_TOKEN }} | docker login registry.gitlab.com -u ${{ secrets.GITLAB_USER }} --password-stdin

- name: Set up QEMU
uses: docker/[email protected]

- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Cache Docker layers
uses: actions/[email protected]
with:
path: /tmp/.buildx-cache
key: buildx-${{ github.sha }}
restore-keys: buildx

- name: Build and Push
uses: docker/[email protected]
with:
platforms: linux/amd64,linux/arm64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
push: ${{ github.ref == 'refs/heads/main' }}
file: Dockerfile
tags: |
cyb3rjak3/pypy-flask:latest
ghcr.io/cyb3r-jak3/pypy-flask:latest
registry.gitlab.com/cyb3r-jak3/pypy-flask:latest
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vscode/*

# Local History for Visual Studio Code
.history/
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM pypy:3-slim

LABEL org.label-schema.vcs-url="https://github.com/Cyb3r-Jak3/pypy-flask.git" \
org.label-schema.schema-version="1.0.0-rc1" \
org.opencontainers.image.source="https://github.com/Cyb3r-Jak3/pypy-flask"

COPY requirements.txt /tmp/pip-tmp/
RUN apt-get update \
&& apt install --no-install-recommends -y build-essential \
&& pip --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
&& rm -rf /tmp/pip-tmp /var/lib/apt/lists/* \
&& apt purge build-essential -y \
&& apt autoremove -y
Loading

0 comments on commit 3ebc123

Please sign in to comment.