forked from popsUlfr/SDH-PauseGames
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge Dockerfile and example files for backend support example (popsU…
…lfr#7) * Add template dockerfile for testing * Switch to holo-docker image * Add default entrypoint.sh * Updated dockerfile to reflect CI/CD on database * Add template makefile, main.c * Adjusted entrypoint.sh to actually build binary * Made entrypoint.sh executable * Big README update and comments in Dockerfile
- Loading branch information
1 parent
4110364
commit af817b6
Showing
6 changed files
with
107 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,3 +40,7 @@ __pycache__/ | |
yalc.lock | ||
|
||
.vscode/settings.json | ||
|
||
# Ignore output folder | ||
|
||
backend/out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# we support images for building with a vanilla SteamOS base, | ||
# or versions with ootb support for rust or go | ||
# developers can also customize these images via this Dockerfile | ||
#FROM ghcr.io/steamdeckhomebrew/holo-toolchain-rust:latest | ||
#FROM ghcr.io/steamdeckhomebrew/holo-toolchain-go:latest | ||
FROM ghcr.io/steamdeckhomebrew/holo-base:latest | ||
|
||
# entrypoint.sh should always be located in the backend folder | ||
ENTRYPOINT [ "/backend/entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# This is the default target, which will be built when | ||
# you invoke make | ||
.PHONY: all | ||
all: hello | ||
|
||
# This rule tells make how to build hello from hello.cpp | ||
hello: | ||
mkdir -p ./out | ||
gcc -o ./out/hello ./src/main.c | ||
|
||
# This rule tells make to delete hello and hello.o | ||
.PHONY: clean | ||
clean: | ||
rm -f hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
echo "Container's IP address: `awk 'END{print $1}' /etc/hosts`" | ||
|
||
cd /backend | ||
|
||
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include <stdio.h> | ||
int main() { | ||
printf("Hello World\n"); | ||
return 0; | ||
} |