-
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.
- Loading branch information
1 parent
be69d1d
commit 7355358
Showing
4 changed files
with
27 additions
and
0 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
*.swp | ||
c/snake | ||
java/*.class |
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,6 @@ | ||
FROM eclipse-temurin:17-jdk | ||
RUN mkdir /app | ||
WORKDIR /app | ||
COPY Snake.java . | ||
RUN javac Snake.java | ||
CMD ["java", "Snake"] |
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,13 @@ | ||
.PHONY: run shell build tunnel | ||
|
||
run: build | ||
docker run -t --init -p 3000:3000 -e PORT=3000 battlesnake | ||
|
||
shell: build | ||
docker run -it --init -p 3000:3000 -e PORT=3000 battlesnake /bin/bash | ||
|
||
build: | ||
docker build -q -t battlesnake . | ||
|
||
tunnel: | ||
ssh -R battlesnake-challenge:80:localhost:3000 serveo.net |
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,7 @@ | ||
public class Snake { | ||
|
||
public static void main(String args[]) { | ||
System.out.println("Hello world!"); | ||
} | ||
|
||
} |