realize a restic containing container
This commit is contained in:
parent
797c832eed
commit
154be23358
4 changed files with 73 additions and 0 deletions
40
infrastrucure/docker/build.py
Normal file
40
infrastrucure/docker/build.py
Normal 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()
|
24
infrastrucure/docker/image/Dockerfile_restic
Normal file
24
infrastrucure/docker/image/Dockerfile_restic
Normal 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
|
8
infrastrucure/docker/test/Dockerfile
Normal file
8
infrastrucure/docker/test/Dockerfile
Normal 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
|
1
infrastrucure/docker/test/serverspec.edn
Normal file
1
infrastrucure/docker/test/serverspec.edn
Normal file
|
@ -0,0 +1 @@
|
|||
{:file []}
|
Loading…
Reference in a new issue