This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add linux support in SystemArchitecture.set(), add Dockerfile's in ex…
…ample
- Loading branch information
1 parent
6bf2a07
commit b28ba5c
Showing
5 changed files
with
77 additions
and
2 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
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,28 @@ | ||
FROM --platform=linux/amd64 alpine:latest | ||
|
||
# Install dependencies | ||
RUN apk update && apk add --no-cache \ | ||
openjdk17 \ | ||
gradle \ | ||
maven \ | ||
git \ | ||
bash | ||
|
||
# Copy application code | ||
COPY bound/kt /app/bound/kt | ||
COPY examples/hosted-wallet-kt /app/examples/hosted-wallet-kt | ||
|
||
# Build the bound/kt project | ||
WORKDIR /app/bound/kt | ||
RUN mvn install | ||
|
||
# Build the hosted-wallet-kt project | ||
WORKDIR /app/examples/hosted-wallet-kt | ||
RUN ./gradlew build | ||
|
||
# Expose ports | ||
EXPOSE 8081 | ||
EXPOSE 8082 | ||
|
||
# Set the default command | ||
CMD ["bash"] |
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,21 @@ | ||
FROM --platform=linux/amd64 ubuntu:22.04 | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
openjdk-17-jdk \ | ||
gradle \ | ||
maven \ | ||
git | ||
|
||
COPY bound/kt /app/bound/kt | ||
COPY examples/hosted-wallet-kt /app/examples/hosted-wallet-kt | ||
|
||
WORKDIR /app/bound/kt | ||
RUN mvn install | ||
|
||
WORKDIR /app/examples/hosted-wallet-kt | ||
RUN ./gradlew build | ||
|
||
EXPOSE 8081 | ||
EXPOSE 8082 | ||
|
||
CMD ["bash"] |
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 @@ | ||
#!/bin/bash | ||
|
||
# Create the network | ||
docker network create hosted-wallet-kt-alpine-network | ||
|
||
# Build the image | ||
docker build -f DockerfileAlpine -t hosted-wallet-kt-alpine ../../ | ||
|
||
# Run the pfi application | ||
docker run -d --name pfi-app-alpine --network hosted-wallet-kt-alpine-network -p 8082:8082 hosted-wallet-kt-alpine ./gradlew :pfi:run | ||
|
||
# Run the wallet application | ||
docker run -d --name wallet-app-alpine --network hosted-wallet-kt-alpine-network -p 8081:8081 hosted-wallet-kt-alpine ./gradlew :wallet:run |
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 @@ | ||
#!/bin/bash | ||
|
||
# Create the network | ||
docker network create hosted-wallet-kt-ubuntu-network | ||
|
||
# Build the image | ||
docker build -f DockerfileUbuntu -t hosted-wallet-kt-ubuntu ../../ | ||
|
||
# Run the pfi application | ||
docker run -d --name pfi-app-ubuntu --network hosted-wallet-kt-ubuntu-network -p 8082:8082 hosted-wallet-kt-ubuntu ./gradlew :pfi:run | ||
|
||
# Run the wallet application | ||
docker run -d --name wallet-app-ubuntu --network hosted-wallet-kt-ubuntu-network -p 8081:8081 hosted-wallet-kt-ubuntu ./gradlew :wallet:run |