Compare commits

...

28 Commits
main ... main

Author SHA1 Message Date
95947e25bd Token fix 2 2026-04-23 17:15:25 +02:00
b97c1de0df retry 2026-04-22 20:37:01 +02:00
97fda1aa26 auth fix 2 2026-04-22 20:33:38 +02:00
a9af5182dd auth fix 2026-04-22 20:26:54 +02:00
581553a70f token fix 2026-04-22 20:22:58 +02:00
6ba1dda43f git push fix 2026-04-22 20:17:46 +02:00
67fc3a08e5 Artefakt nur löschen wenn es exestiert 2026-04-22 20:13:13 +02:00
073013c7a4 repo link fix 2026-04-22 20:07:38 +02:00
dd6240dcab Name fix 2026-04-22 20:04:48 +02:00
d7e9867ad7 Merge branch 'main' of https://git.efi.th-nuernberg.de/gitea/jannerju95124/EinfuehrungInDocker_Pipeline2 2026-04-22 19:59:15 +02:00
32d5fa1ccc Sicherheitscheck update 2026-04-22 19:59:10 +02:00
b60a00d1e2 merge upstream 2026-04-22 09:17:06 +00:00
65af3e65c9 Image größe optimiert 2026-04-22 11:12:37 +02:00
8c03a54db6 Dockerfile aktualisiert 2026-04-11 12:09:06 +00:00
091a721dc9 Dockerfile aktualisiert 2026-04-11 11:58:06 +00:00
2f88d401b4 Dockerfile aktualisiert 2026-04-11 11:56:31 +00:00
46b36f449c Dockerfile aktualisiert 2026-04-11 11:53:50 +00:00
016a6dfb21 .drone.yml aktualisiert 2026-04-11 11:48:02 +00:00
abb6599234 revert 175c53e63297724bf1f66003a858e9bcb36a8d8b
revert Dockerfile aktualisiert
2026-04-11 11:47:20 +00:00
175c53e632 Dockerfile aktualisiert 2026-04-11 11:44:55 +00:00
4b7d9b1a41 Dockerfile aktualisiert 2026-04-11 11:42:31 +00:00
c9d6a821bf Dockerfile aktualisiert 2026-04-11 11:40:58 +00:00
10853b8252 Dockerfile aktualisiert 2026-04-11 11:29:43 +00:00
54d5d42e98 Dockerfile aktualisiert 2026-04-11 11:25:37 +00:00
55744a4a7c Dockerfile aktualisiert 2026-04-11 11:24:54 +00:00
80b3ff2d4d revert 6a1733afa82cad66eb27e545415d29684b52e8a2
revert Dockerfile aktualisiert
2026-04-11 11:23:23 +00:00
6a1733afa8 Dockerfile aktualisiert 2026-04-11 11:21:48 +00:00
09ee7386fd Dockerfile aktualisiert 2026-04-11 11:19:56 +00:00
5 changed files with 126 additions and 12 deletions

View File

@ -34,7 +34,7 @@ steps:
image: alpine:latest
environment:
GITEA_TOKEN:
from_secret: GITEA_TOKEN
from_secret: DroneToken
commands:
- apk add --no-cache git
@ -42,18 +42,15 @@ steps:
- git config --global user.email "drone@ci.local"
- git config --global user.name "Drone CI"
# Remote setzen
#- git remote set-url origin https://git.efi.th-nuernberg.de/gitea/freudenreichan/EinfuehrungInDocker_Pipeline2
# Repo clonen
- git clone https://git.efi.th-nuernberg.de/gitea/freudenreichan/EinfuehrungInDocker_Pipeline2.git
- cd EinfuehrungInDocker_Pipeline
- git clone https://$GITEA_TOKEN@git.efi.th-nuernberg.de/gitea/jannerju95124/EinfuehrungInDocker_Pipeline2.git
- cd EinfuehrungInDocker_Pipeline2
# Branch wechseln oder erstellen
- git checkout drone-artifacts || git checkout -b drone-artifacts
# Artifact löschen und neu hinzufügen
- git rm image.tar
- git rm image.tar || true
- cp $DRONE_WORKSPACE/image.tar .
- git add image.tar
@ -64,4 +61,4 @@ steps:
- git pull || true
# Push
- git push
- git push --set-upstream origin drone-artifacts

18
.vscode/c_cpp_properties.json vendored Normal file
View File

@ -0,0 +1,18 @@
{
"configurations": [
{
"name": "windows-gcc-x64",
"includePath": [
"${workspaceFolder}/**"
],
"compilerPath": "C:/ProgramData/mingw64/mingw64/bin/gcc.exe",
"cStandard": "${default}",
"cppStandard": "${default}",
"intelliSenseMode": "windows-gcc-x64",
"compilerArgs": [
""
]
}
],
"version": 4
}

24
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,24 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "C/C++ Runner: Debug Session",
"type": "cppdbg",
"request": "launch",
"args": [],
"stopAtEntry": false,
"externalConsole": true,
"cwd": "c:/UNI/6.Semester/Docker/Austausch/Healthcheck/EinfuehrungInDocker_Pipeline2",
"program": "c:/UNI/6.Semester/Docker/Austausch/Healthcheck/EinfuehrungInDocker_Pipeline2/build/Debug/outDebug",
"MIMode": "gdb",
"miDebuggerPath": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}

59
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,59 @@
{
"C_Cpp_Runner.cCompilerPath": "gcc",
"C_Cpp_Runner.cppCompilerPath": "g++",
"C_Cpp_Runner.debuggerPath": "gdb",
"C_Cpp_Runner.cStandard": "",
"C_Cpp_Runner.cppStandard": "",
"C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat",
"C_Cpp_Runner.useMsvc": false,
"C_Cpp_Runner.warnings": [
"-Wall",
"-Wextra",
"-Wpedantic",
"-Wshadow",
"-Wformat=2",
"-Wcast-align",
"-Wconversion",
"-Wsign-conversion",
"-Wnull-dereference"
],
"C_Cpp_Runner.msvcWarnings": [
"/W4",
"/permissive-",
"/w14242",
"/w14287",
"/w14296",
"/w14311",
"/w14826",
"/w44062",
"/w44242",
"/w14905",
"/w14906",
"/w14263",
"/w44265",
"/w14928"
],
"C_Cpp_Runner.enableWarnings": true,
"C_Cpp_Runner.warningsAsError": false,
"C_Cpp_Runner.compilerArgs": [],
"C_Cpp_Runner.linkerArgs": [],
"C_Cpp_Runner.includePaths": [],
"C_Cpp_Runner.includeSearch": [
"*",
"**/*"
],
"C_Cpp_Runner.excludeSearch": [
"**/build",
"**/build/**",
"**/.*",
"**/.*/**",
"**/.vscode",
"**/.vscode/**"
],
"C_Cpp_Runner.useAddressSanitizer": false,
"C_Cpp_Runner.useUndefinedSanitizer": false,
"C_Cpp_Runner.useLeakSanitizer": false,
"C_Cpp_Runner.showCompilationTime": false,
"C_Cpp_Runner.useLinkTimeOptimization": false,
"C_Cpp_Runner.msvcSecureNoWarnings": false
}

View File

@ -1,9 +1,8 @@
# Base-Image
FROM ubuntu:latest
FROM alpine:latest AS builder
# Pakete installieren
RUN apt-get update
RUN apt-get install -y build-essential gcc curl vim net-tools
RUN apk add --no-cache build-base
# Arbeitsverzeichnis setzen
WORKDIR /app
@ -14,8 +13,25 @@ COPY . .
# Code kompilieren
RUN gcc -o deployment deployment.c
# Stage 2
FROM alpine:latest
RUN apk upgrade --no-cache
RUN addgroup -S stdgroup && adduser -S stduser -G stdgroup
WORKDIR /app
COPY --from=builder /app/deployment .
# Verzeichnis für Ausgabe anlegen
RUN mkdir /output
RUN mkdir /output && chown stduser:stdgroup /output
VOLUME ["/output"]
USER stduser
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 CMD test -f /output/output.txt || exit 1
# Ausgabe wird ins Container-Dateisystem geschrieben
ENTRYPOINT ["/bin/bash", "-c"]