with alpine

This commit is contained in:
Kasper Juul Hermansen 2022-10-29 23:39:21 +02:00
parent a872bad97d
commit cadac9fc08
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ steps:
- mkdir -p tmp/dagger-go
- git clone "https://git.front.kjuulh.io/kjuulh/dagger-go.git" tmp/dagger-go
- docker build -t dagger-go-builder:${DRONE_COMMIT} -f tmp/dagger-go/Dockerfile .
- 'docker run -v "$PWD/:/src/" -v /var/run/docker.sock:/var/run/docker.sock dagger-go-builder:${DRONE_COMMIT} dagger-go build'
- 'docker run -v "$PWD/:/src/" -e DRONE_REPO_NAME="${DRONE_REPO_NAME}" -v /var/run/docker.sock:/var/run/docker.sock dagger-go-builder:${DRONE_COMMIT} dagger-go build'
services:
- name: docker

View File

@ -30,7 +30,7 @@ func Build(builder *internal.Builder, imageTag string, buildPath string) error {
return err
}
golang := client.Container().From("golang:latest")
golang := client.Container().From("harbor.front.kjuulh.io/docker-proxy/library/golang:alpine")
golang = golang.WithMountedDirectory("/src", src).WithWorkdir("/src")
_, err = golang.Exec(dagger.ContainerExecOpts{
Args: []string{"go", "build", "-o", "build/", buildPath},