realize a restic containing container

This commit is contained in:
jem 2020-11-12 16:53:02 +01:00
parent 797c832eed
commit 154be23358
4 changed files with 73 additions and 0 deletions

View file

@ -0,0 +1,40 @@
from subprocess import run
from os import environ
from pybuilder.core import task, init
from ddadevops import *
import logging
name = 'meissa-cloud'
MODULE = 'docker'
PROJECT_ROOT_PATH = '../..'
class MyBuild(DevopsDockerBuild):
pass
@init
def initialize(project):
project.build_depends_on('ddadevops>=0.6.1')
stage = 'notused'
dockerhub_user = 'notused'
dockerhub_password = 'notused'
config = create_devops_docker_build_config(
stage, PROJECT_ROOT_PATH, MODULE, dockerhub_user, dockerhub_password)
build = MyBuild(project, config)
build.initialize_build_dir()
@task
def image(project):
build = get_devops_build(project)
build.image()
@task
def drun(project):
build = get_devops_build(project)
build.drun()
@task
def test(project):
build = get_devops_build(project)
build.test()

View file

@ -0,0 +1,24 @@
FROM ubuntu:focal
# https://stackoverflow.com/questions/59299133/how-to-silent-install-postgresql-in-ubuntu-via-dockerfile
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install restic ca-certificates -y
RUN update-ca-certificates
# This will install the latest postgresql version
# Taken from https://www.postgresql.org/download/linux/ubuntu/
RUN apt-get -y install vim bash-completion wget lsb-release gnupg
# Create the file repository configuration:
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
# Import the repository signing key:
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
# Update the package lists:
RUN apt-get update
# Install the latest version of PostgreSQL.
# If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql':
RUN apt-get -y install postgresql

View file

@ -0,0 +1,8 @@
FROM meissa-cloud
RUN curl -L -o /tmp/serverspec.jar \
https://github.com/DomainDrivenArchitecture/dda-serverspec-crate/releases/download/1.3.4/dda-serverspec-standalone.jar
COPY serverspec.edn /tmp/serverspec.edn
RUN java -jar /tmp/serverspec.jar /tmp/serverspec.edn -v

View file

@ -0,0 +1 @@
{:file []}