Skip to content

Commit

Permalink
Add update-docker-engine (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
DriesSchaumont authored Jun 20, 2023
1 parent 801b7db commit fb09a35
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# viash-actions v3.2.0

## New features

* Added `update-docker-engine`.

# viash-actions v3.1.2

## Bug fixes
Expand Down
23 changes: 23 additions & 0 deletions update-docker-engine/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Install or Update Latest Available Docker

Install the latest Docker Engine or update an existing one to the latest available version.
Note that this action only works on Ubuntu based images.


## Examples

```yaml
name: demo of update-docker-engine

on:
push:

jobs:
demo:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: viash-io/viash-actions/update-docker-engine@v3
```
22 changes: 22 additions & 0 deletions update-docker-engine/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Update Docker Engine'
author: Data Intuitive
description: >
Install the latest Docker Engine or update an existing one to the latest available version.
Note that this action only works on Ubuntu based images.
runs:
using: 'composite'
steps:
- name: Update or Install Latest Docker
shell: bash
run: |
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

0 comments on commit fb09a35

Please sign in to comment.