From c904a6db9f0f4c0792882bd2d841af904ce8a709 Mon Sep 17 00:00:00 2001 From: dm Date: Tue, 13 Aug 2024 10:44:42 +0800 Subject: [PATCH] 1 --- .gitea/workflows/build.yaml | 4 ++++ Dockerfile | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 Dockerfile diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index e3b7532..91a8f04 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -21,3 +21,7 @@ jobs: uses: https://gitea.com/actions/checkout@v4 with: fetch-depth: 0 + - run: echo "🛠️ The Gitea Actions workflow is now ready to test your code on the runner." + - name: Build Docker image + run: docker build -t my-docker-image . + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..dde9067 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +# Use an official Go runtime as the base image +FROM golang:1.21 + +# Set the working directory inside the container +WORKDIR /app + +# Copy the source code into the container +COPY . . + +# Build the Go application +RUN go build -o app + +# Set the entry point for the container +ENTRYPOINT ["./app"] \ No newline at end of file