forked from freudenreichan/EinfuehrungInDocker_Pipeline2
Compare commits
9
Commits
cd3a2c263e
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98422eecdd | ||
|
|
5814197430 | ||
|
|
9fd4455348 | ||
|
|
26a57702d7 | ||
|
|
bd778673a2 | ||
|
|
4bb7b1de7b | ||
|
|
8027e9e2ee | ||
|
|
a86e31d69a | ||
|
|
07efd2bc17 |
No files matched your search
+3
-3
@@ -46,14 +46,14 @@ steps:
|
|||||||
#- git remote set-url origin https://git.efi.th-nuernberg.de/gitea/freudenreichan/EinfuehrungInDocker_Pipeline2
|
#- git remote set-url origin https://git.efi.th-nuernberg.de/gitea/freudenreichan/EinfuehrungInDocker_Pipeline2
|
||||||
|
|
||||||
# Repo clonen
|
# Repo clonen
|
||||||
- git clone https://git.efi.th-nuernberg.de/gitea/freudenreichan/EinfuehrungInDocker_Pipeline2.git
|
- git clone https://git.efi.th-nuernberg.de/gitea/schreinerma97192/EinfuehrungInDocker_Pipeline2.git
|
||||||
- cd EinfuehrungInDocker_Pipeline
|
- cd EinfuehrungInDocker_Pipeline2
|
||||||
|
|
||||||
# Branch wechseln oder erstellen
|
# Branch wechseln oder erstellen
|
||||||
- git checkout drone-artifacts || git checkout -b drone-artifacts
|
- git checkout drone-artifacts || git checkout -b drone-artifacts
|
||||||
|
|
||||||
# Artifact löschen und neu hinzufügen
|
# Artifact löschen und neu hinzufügen
|
||||||
- git rm image.tar
|
- git rm -f image.tar || true
|
||||||
- cp $DRONE_WORKSPACE/image.tar .
|
- cp $DRONE_WORKSPACE/image.tar .
|
||||||
- git add image.tar
|
- git add image.tar
|
||||||
|
|
||||||
|
|||||||
+8
-6
@@ -1,10 +1,10 @@
|
|||||||
# BUILD STAGE
|
# BUILD STAGE
|
||||||
# Base-Image
|
# Base-Image
|
||||||
FROM debian:stable-slim AS build
|
FROM cgr.dev/chainguard/wolfi-base:latest AS build
|
||||||
|
|
||||||
# Pakete installieren
|
# Pakete installieren
|
||||||
RUN apt-get update
|
RUN apk update
|
||||||
RUN apt-get install -y build-essential gcc curl vim net-tools
|
RUN apk add build-base gcc
|
||||||
|
|
||||||
# Arbeitsverzeichnis setzen
|
# Arbeitsverzeichnis setzen
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -17,9 +17,11 @@ RUN gcc -o deployment deployment.c
|
|||||||
|
|
||||||
|
|
||||||
# RUNTIME STAGE
|
# RUNTIME STAGE
|
||||||
FROM debian:stable-slim
|
FROM cgr.dev/chainguard/wolfi-base:latest
|
||||||
|
|
||||||
|
RUN adduser -D appuser
|
||||||
|
RUN mkdir -p /output && chown -R appuser:appuser /output
|
||||||
|
|
||||||
RUN useradd -m appuser
|
|
||||||
USER appuser
|
USER appuser
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -34,5 +36,5 @@ HEALTHCHECK CMD test -f /output/output.txt || exit 1
|
|||||||
# RUN mkdir /output
|
# RUN mkdir /output
|
||||||
|
|
||||||
# Ausgabe wird ins Container-Dateisystem geschrieben
|
# Ausgabe wird ins Container-Dateisystem geschrieben
|
||||||
ENTRYPOINT ["/bin/bash", "-c"]
|
ENTRYPOINT ["/bin/sh", "-c"]
|
||||||
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"]
|
CMD ["./deployment 10 > /output/output.txt && tail -f /output/output.txt"]
|
||||||
Reference in new issue
Block a user