Skip to content

Commit

Permalink
Merge pull request #1 from umtdg/docker
Browse files Browse the repository at this point in the history
Docker
  • Loading branch information
umtdg authored Jan 9, 2025
2 parents 45727b9 + 797ff6b commit 5fb9843
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Docker

on:
push:
branches:
- master

jobs:
docker:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push latest
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64
push: true
file: Dockerfile
tags: umtdg/nvim

- name: Build and push Ubuntu 20.04
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64
push: true
file: Dockerfile
tags: umtdg/nvim:20.04
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM umtdg/ubuntu:24.04

SHELL [ "/bin/bash", "-c" ]

USER ubuntu
WORKDIR /home/$USER

RUN mkdir -p $HOME/.config

# Install neovim and dependencies
RUN DEBIAN_FRONTEND=noninteractive sudo apt install -y --no-install-recommends \
make gcc ripgrep unzip git xclip wget
RUN wget -q --show-progress https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
RUN sudo tar -C /opt -xzf nvim-linux64.tar.gz
RUN echo 'export PATH="$PATH:/opt/nvim-linux64/bin"' | sudo tee -a $HOME/.bashrc
RUN rm -fv nvim-linux64.tar.gz

# Add config
ADD --chown=$USER . $HOME/.config/nvim
19 changes: 19 additions & 0 deletions Dockerfile.20.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM umtdg/ubuntu:20.04

SHELL [ "/bin/bash", "-c" ]

USER devuser
WORKDIR /home/$USER

RUN mkdir -p $HOME/.config

# Install neovim and dependencies
RUN DEBIAN_FRONTEND=noninteractive sudo apt install -y --no-install-recommends \
make gcc ripgrep unzip git xclip wget
RUN wget -q --show-progress https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
RUN sudo tar -C /opt -xzf nvim-linux64.tar.gz
RUN echo 'export PATH="$PATH:/opt/nvim-linux64/bin"' | sudo tee -a $HOME/.bashrc
RUN rm -fv nvim-linux64.tar.gz

# Add config
ADD --chown=$USER . $HOME/.config/nvim

0 comments on commit 5fb9843

Please sign in to comment.