Skip to content

Commit

Permalink
Merge pull request #251 from beevelop/update
Browse files Browse the repository at this point in the history
Update image
  • Loading branch information
beevelop authored Feb 14, 2021
2 parents fd413f0 + af4f980 commit 9ea9f66
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 19 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Docker Image

on:
schedule:
- cron: "0 18 * * *" # everyday at 6pm
push:
branches: ["**"]
tags: ["v*.*.*"]

env:
platforms: linux/amd64

jobs:
main:
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Set imageName based on the repository name
id: step_one
run: |
imageName="${GITHUB_REPOSITORY/docker-/}"
echo $imageName
echo "imageName=$imageName" >> $GITHUB_ENV
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: ${{ env.imageName }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Harbor
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Buildx cache
uses: actions/cache@v1
with:
path: ${{ github.workspace }}/cache
key: ${{ runner.os }}-docker-${{ hashfiles('cache/**') }}
restore-keys: |
${{ runner.os }}-docker
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
platforms: ${{ env.platforms }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=local,src=${{ github.workspace }}/cache
cache-to: type=local,dest=${{ github.workspace }}/cache
# - name: Run Trivy vulnerability scanner
# uses: aquasecurity/trivy-action@master
# with:
# image-ref: ${{ env.imageName }}:${{ steps.docker_meta.outputs.version }}
# format: "template"
# template: "@/contrib/sarif.tpl"
# output: "trivy-results.sarif"
# - name: Upload Trivy scan results to GitHub Security tab
# uses: github/codeql-action/upload-sarif@v1
# with:
# sarif_file: "trivy-results.sarif"
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
FROM beevelop/cordova

ENV IONIC_VERSION 5.2.3
ENV IONIC_VERSION 6.12.4

RUN apt-get update && apt-get install -y git bzip2 openssh-client && \
npm i -g --unsafe-perm ionic@${IONIC_VERSION} && \
ionic --no-interactive config set -g daemon.updates false && \
npm install -g --unsafe-perm @ionic/cli@${IONIC_VERSION} && \
ionic --version && \
cd /tmp && \
ionic start myNewProject blank --type=ionic-angular --capacitor && \
cd myNewProject && \
ionic build && \
ionic capacitor build android --no-open && \
rm -rf /tmp/myNewProject && \
rm -rf /var/lib/apt/lists/* && apt-get clean
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015-2019 Maik Hummel
Copyright (c) 2015-2021 Maik Hummel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[![Travis](https://shields.beevelop.com/travis/beevelop/docker-ionic.svg?style=flat-square)](https://travis-ci.org/beevelop/docker-ionic)
[![Pulls](https://shields.beevelop.com/docker/pulls/beevelop/ionic.svg?style=flat-square)](https://links.beevelop.com/d-ionic)
[![Layers](https://shields.beevelop.com/docker/image/layers/beevelop/ionic/latest.svg?style=flat-square)](https://links.beevelop.com/d-ionic)
[![Size](https://shields.beevelop.com/docker/image/size/beevelop/ionic/latest.svg?style=flat-square)](https://links.beevelop.com/d-ionic)
Expand All @@ -7,30 +6,37 @@
[![Beevelop](https://links.beevelop.com/honey-badge)](https://beevelop.com)

# Latest Ionic
### based on the latest Cordova with the latest Android and the latest Node.js
----

### based on the latest Cordova with Android `11` and Node.js `14`

---

### Pull from Docker Hub

```
docker pull beevelop/ionic:latest
```

### Build from GitHub

```
docker build -t beevelop/ionic github.com/beevelop/docker-ionic
```

### Run image

```
docker run -it beevelop/ionic bash
```

### Use as base image

```Dockerfile
FROM beevelop/ionic:latest
```


----
---

### Use tags where possible, because...

![One does not simply use latest](https://i.imgflip.com/1fgwxr.jpg)

0 comments on commit 9ea9f66

Please sign in to comment.