first commit

This commit is contained in:
2026-03-19 15:13:53 +01:00 Verified
commit d1e81872da
2 changed files with 129 additions and 0 deletions
+67
View File
@@ -0,0 +1,67 @@
name: Docker Push & Push
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
push:
branches:
- 'master'
- 'testing'
paths-ignore:
- 'README.md'
- 'docker-compose.yml'
# Rebuild monthly to keep packages up to date
schedule:
- cron: '0 0 1 * *'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v3
if: github.repository_owner == 'Swedish-Wiking'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Docker Metadata
id: docker-meta
uses: docker/metadata-action@v5
with:
images: swedishwiking/docker-wireguard-pia-python
tags: |
# Tag branches with branch name, but disable for default branch
type=ref,event=branch,enable=${{ github.ref_name != 'master' }}
# set latest tag for default branch
type=raw,value=latest,enable=${{ github.ref_name == 'master' }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm,linux/arm64
push: ${{ github.repository_owner == 'Swedish-Wiking' }}
tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }}
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
+62
View File
@@ -0,0 +1,62 @@
FROM ubuntu:latest
# Updates and installs commons
RUN apt-get update \
&& apt-get install -y \
curl \
git \
sudo \
vim \
wget \
locales
# Install Python
RUN apt-get install -y \
python3 \
python3-tk \
python-is-python3
# Install JAVA
RUN apt-get install -y \
default-jdk \
openjdk-21-source
# Install Scala
ARG SCALA_VERSION="3.6.3"
ARG URL="https://github.com/scala/scala3/releases/download/${SCALA_VERSION}/scala3-${SCALA_VERSION}.tar.gz"
ARG SCALA_DIR="/usr/share/scala3-${SCALA_VERSION}"
RUN curl -fsL --show-error ${URL} | tar xfz - -C /usr/share && \
mv ${SCALA_DIR} /usr/share/scala && \
chown -R root:root /usr/share/scala && \
chmod -R 755 /usr/share/scala && \
ln -s /usr/share/scala/bin/* /usr/local/bin
# Install R
RUN apt-get install -y \
r-base \
build-essential \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
libfontconfig1-dev
# && Rscript -e 'install.packages(c("languageserver", "ggplot2", "reshape2", "httpgd"))'
# Install TeX-live
# RUN apt-get install -y texlive-full
# Clears apt lists
RUN rm -rf /var/lib/apt/lists/*
# Sets local
RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG=en_US.utf8
# Adds the default User
ARG USER=lth-student
RUN useradd --groups sudo --no-create-home --shell /bin/bash ${USER} \
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${USER} \
&& chmod 0440 /etc/sudoers.d/${USER}
# Sets user and work directory
USER ${USER}
WORKDIR /home/${USER}