1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 05:11:06 +02:00

Added the gcc and musl-dev packages in the builder layer of the Dockerfile.

This commit is contained in:
Rehan Mahmood 2024-01-25 11:25:02 -05:00
parent 47fc96b98f
commit 9ad2af18bd
3 changed files with 10 additions and 10 deletions

View file

@ -10,8 +10,8 @@ jobs:
name: Go unit tests name: Go unit tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: actions/setup-go@v4 - uses: actions/setup-go@v5
with: with:
go-version: '1.20' go-version: '1.20'
- run: go version - run: go version

View file

@ -24,11 +24,11 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- -
name: Docker meta name: Docker meta
id: docker_meta id: docker_meta
uses: docker/metadata-action@v4 uses: docker/metadata-action@v5
with: with:
images: schollz/croc images: schollz/croc
# generate Docker tags based on the following events/attributes # generate Docker tags based on the following events/attributes
@ -41,20 +41,20 @@ jobs:
type=sha type=sha
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v3
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v3
- -
name: Login to DockerHub name: Login to DockerHub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v3 uses: docker/build-push-action@v5
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile

View file

@ -1,5 +1,5 @@
FROM golang:1.19-alpine as builder FROM golang:1.20-alpine as builder
RUN apk add --no-cache git RUN apk add --no-cache git gcc musl-dev
WORKDIR /go/croc WORKDIR /go/croc
COPY . . COPY . .
RUN go build -v -ldflags="-s -w" RUN go build -v -ldflags="-s -w"