Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker improvements #95

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Docker

on:
push:
branches:
- master
- github-docker
tags:
- '*'

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
id: buildx
with:
install: true

- name: Set Docker metadata
id: meta-ubuntu
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=ref,event=tag
type=ref,event=branch,prefix=testing-
type=edge

- name: GitHub Container Registry Login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker Build and Push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64
file: Dockerfile
pull: true
push: true
tags: ${{ steps.meta-ubuntu.outputs.tags }}
labels: ${{ steps.meta-ubuntu.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
14 changes: 1 addition & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
FROM trailofbits/echidna:latest

RUN apt-get update && apt-get install -y python3.8-dev
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 && \
update-alternatives --set python /usr/bin/python3.8

RUN python -m pip install --upgrade pip

RUN mkdir /optik
COPY . /optik

WORKDIR /optik

RUN python -m pip install .

RUN mkdir /workdir
RUN pip3 install --no-cache-dir /optik

WORKDIR /workdir