add docker image build
This commit is contained in:
parent
a73acb8b93
commit
a3c2d17c69
16
build/docker/container-image-build.jx.yaml
Normal file
16
build/docker/container-image-build.jx.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
imports:
|
||||||
|
- /etc/jx/dockerhub.jx.yaml
|
||||||
|
resources:
|
||||||
|
- type: container-image
|
||||||
|
config: dockerhub
|
||||||
|
transition: update
|
||||||
|
attributes:
|
||||||
|
name: rosskeenhouse/build-golang:1.22.6-alpine
|
||||||
|
push: true
|
||||||
|
dockerfile: |-
|
||||||
|
FROM golang:1.22.6-alpine
|
||||||
|
COPY . /opt/build
|
||||||
|
WORKDIR /opt/build
|
||||||
|
RUN ./jx apply ./alpine.jx.yaml
|
||||||
|
contextref: file://build/docker/golang/build
|
32
build/docker/golang/build/alpine.jx.yaml
Normal file
32
build/docker/golang/build/alpine.jx.yaml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
imports:
|
||||||
|
- file://common.jx.yaml
|
||||||
|
resources:
|
||||||
|
- type: package
|
||||||
|
transition: create
|
||||||
|
attributes:
|
||||||
|
name: musl-dev
|
||||||
|
- type: package
|
||||||
|
transition: create
|
||||||
|
attributes:
|
||||||
|
name: luajit
|
||||||
|
verion: =~2.2
|
||||||
|
- type: package
|
||||||
|
transition: create
|
||||||
|
attributes:
|
||||||
|
name: luajit-dev
|
||||||
|
- type: package
|
||||||
|
transition: create
|
||||||
|
attributes:
|
||||||
|
name: protobuf
|
||||||
|
- type: package
|
||||||
|
transition: create
|
||||||
|
attributes:
|
||||||
|
name: openjdk8
|
||||||
|
- type: package
|
||||||
|
transition: create
|
||||||
|
attributes:
|
||||||
|
name: docker
|
||||||
|
- type: package
|
||||||
|
transition: create
|
||||||
|
attributes:
|
||||||
|
name: openssh-client
|
45
build/docker/golang/build/common.jx.yaml
Normal file
45
build/docker/golang/build/common.jx.yaml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
resources:
|
||||||
|
- type: file
|
||||||
|
transition: create
|
||||||
|
attributes:
|
||||||
|
path: /usr/local/bin/antlr-4.10-complete.jar
|
||||||
|
sourceref: https://www.antlr.org/download/antlr-4.10-complete.jar
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0755
|
||||||
|
- type: package
|
||||||
|
transition: create
|
||||||
|
attributes:
|
||||||
|
name: make
|
||||||
|
- type: package
|
||||||
|
transition: create
|
||||||
|
attributes:
|
||||||
|
name: openssl
|
||||||
|
- type: package
|
||||||
|
transition: create
|
||||||
|
attributes:
|
||||||
|
name: curl
|
||||||
|
- type: package
|
||||||
|
transition: create
|
||||||
|
attributes:
|
||||||
|
name: git
|
||||||
|
- type: package
|
||||||
|
transition: create
|
||||||
|
attributes:
|
||||||
|
name: gcc
|
||||||
|
- type: exec
|
||||||
|
transition: create
|
||||||
|
attributes:
|
||||||
|
create:
|
||||||
|
path: go
|
||||||
|
args:
|
||||||
|
- install
|
||||||
|
- google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
||||||
|
- type: exec
|
||||||
|
transition: create
|
||||||
|
attributes:
|
||||||
|
create:
|
||||||
|
path: go
|
||||||
|
args:
|
||||||
|
- install
|
||||||
|
- golang.org/x/vuln/cmd/govulncheck@latest
|
@ -197,7 +197,8 @@ attributes:
|
|||||||
gecos: "foo user"
|
gecos: "foo user"
|
||||||
`)
|
`)
|
||||||
|
|
||||||
assert.Nil(t, rw.Write(userdecl))
|
_, writeErr := rw.Write(userdecl)
|
||||||
|
assert.Nil(t, writeErr)
|
||||||
}))
|
}))
|
||||||
defer server.Close()
|
defer server.Close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user