added new image
This commit is contained in:
parent
9b235a328d
commit
ba3b6e480b
5 changed files with 162 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
name: MATE build
|
||||
name: Fedora MATE build
|
||||
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
name: XFCE build
|
||||
name: Fedora XFCE build
|
||||
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
77
.github/workflows/ubuntu-mate-build.yml
vendored
Normal file
77
.github/workflows/ubuntu-mate-build.yml
vendored
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
name: Ubuntu MATE build
|
||||
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '39 15 * * *'
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
# Publish semver tags as releases.
|
||||
tags: [ 'v*.*.*' ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
# Use docker.io for Docker Hub if empty
|
||||
REGISTRY: ghcr.io
|
||||
# github.repository as <account>/<repo>
|
||||
IMAGE_NAME: ${{ github.repository }}/containerdesk-ubuntu-mate
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
|
||||
build_mate:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
# This is used to complete the identity challenge
|
||||
# with sigstore/fulcio when running outside of PRs.
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Workaround: https://github.com/docker/build-push-action/issues/461
|
||||
- name: Setup Docker buildx
|
||||
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
|
||||
|
||||
# Login against a Docker registry except on PR
|
||||
# https://github.com/docker/login-action
|
||||
- name: Log into registry ${{ env.REGISTRY }}
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Extract metadata (tags, labels) for Docker
|
||||
# https://github.com/docker/metadata-action
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
# Build and push Docker image with Buildx (don't push on PR)
|
||||
# https://github.com/docker/build-push-action
|
||||
- name: Build and push Docker image
|
||||
id: build-and-push
|
||||
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
|
||||
with:
|
||||
context: ./ubuntu-mate
|
||||
file: ./ubuntu-mate/Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
46
ubuntu-mate/Dockerfile
Normal file
46
ubuntu-mate/Dockerfile
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
FROM ghcr.io/linuxserver/rdesktop:ubuntu-mate
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
LABEL build_version="based on Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="Michael Trip"
|
||||
|
||||
RUN \
|
||||
echo "**** install packages ****" && \
|
||||
apt update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install wget -y && \
|
||||
echo "**** adding kubectl stuff ****" && \
|
||||
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg && \
|
||||
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list && \
|
||||
echo "**** Installing vscode stuff ***" && \
|
||||
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg && \
|
||||
cp packages.microsoft.gpg /etc/apt/keyrings && \
|
||||
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install apt-transport-https -y &&\
|
||||
apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install --no-install-recommends -y \
|
||||
vim \
|
||||
neofetch \
|
||||
libreoffice \
|
||||
thunderbird \
|
||||
pluma \
|
||||
tilix \
|
||||
terminator \
|
||||
kubectl \
|
||||
code && \
|
||||
echo "**** cleanup ****" && \
|
||||
apt-get autoclean && \
|
||||
rm -rf \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* \
|
||||
/tmp/*
|
||||
|
||||
|
||||
# add local files
|
||||
COPY /root /
|
||||
|
||||
# ports and volumes
|
||||
EXPOSE 3389
|
||||
VOLUME /home
|
||||
VOLUME /config
|
||||
37
ubuntu-mate/root/etc/cont-init.d/60-create-user
Normal file
37
ubuntu-mate/root/etc/cont-init.d/60-create-user
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
|
||||
echo "**** create ${USERNAME} user and make our folders ****" && \
|
||||
useradd -u 912 -U -d /home/${USERNAME} -s /bin/bash ${USERNAME}
|
||||
usermod -G users,sudo ${USERNAME}
|
||||
echo "${USERNAME}:${PASSWORD}" | chpasswd
|
||||
mkdir -p /home/${USERNAME}
|
||||
chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}
|
||||
|
||||
chmod 755 /etc
|
||||
chmod 755 /etc/xrdp
|
||||
chmod 755 /etc/xrdp/sesman.ini
|
||||
|
||||
touch /home/${USERNAME}/lock.file
|
||||
|
||||
# create .config dir
|
||||
[[ ! -d /home/${USERNAME}/.config ]] && \
|
||||
mkdir -p /home/${USERNAME}/.config
|
||||
|
||||
|
||||
cp /defaults/startwm.sh /home/${USERNAME}/startwm.sh
|
||||
chmod +x /home/${USERNAME}/startwm.sh
|
||||
chown -R ${USERNAME}:${USERAME} /home/${USERNAME}
|
||||
|
||||
# permissions
|
||||
PERM=$(stat -c '%U' /home/${USERNAME}/.config)
|
||||
[[ "${PERM}" != "${USERNAME}" ]] && \
|
||||
chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}
|
||||
|
||||
|
||||
# set random password for abc user to prevent it from connecting
|
||||
|
||||
RANDOM_PASS=`tr -dc A-Za-z0-9 </dev/urandom | head -c 13 ; echo ''`
|
||||
|
||||
echo abc:${RANDOM_PASS} | chpasswd
|
||||
usermod -s /bin/false abc
|
||||
Loading…
Add table
Add a link
Reference in a new issue