Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Golang Dockerfile #145

Merged
merged 8 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ updates:
open-pull-requests-limit: 10
- package-ecosystem: docker
directory: "./dockerfiles/android"
schedule:
interval: weekly
open-pull-requests-limit: 10
- package-ecosystem: docker
directory: "./dockerfiles/golang"
schedule:
interval: weekly
open-pull-requests-limit: 10
2 changes: 1 addition & 1 deletion .gitpod/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This Dockerfile is used to create a Gitpod workspace with GitHub CLI installed.

# We start from the Gitpod full workspace image which includes a broad range of development tools.
FROM gitpod/workspace-full
FROM gitpod/workspace-full:2024-03-05-10-13-49

# The RUN command executes a series of commands in the new layer of the image and commits the results.
# The following commands are executed:
Expand Down
23 changes: 23 additions & 0 deletions dockerfiles/golang/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM jenkins/ssh-agent:5.25.0 as ssh-agent

# ca-certificates because curl will need it later on for the maven installation
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Now time to install maven
ARG GOLANG_VERSION=1.21.8
ARG TARGETARCH
ENV ARCHITECTURE=$TARGETARCH

# Set SHELL flags for RUN commands to allow -e and pipefail
# Rationale:https://github.com/hadolint/hadolint/wiki/DL4006
SHELL ["/bin/bash", "-eo", "pipefail", "-c"]

RUN curl -sS -L -O --output-dir /tmp/ --create-dirs "https://go.dev/dl/go${GOLANG_VERSION}.linux-${ARCHITECTURE}.tar.gz" && \
rm -rf /usr/local/go && tar -C /usr/local -xzf /tmp/go"$GOLANG_VERSION".linux-${ARCHITECTURE}.tar.gz && \
rm -rf /tmp/go"$GOLANG_VERSION".linux-${ARCHITECTURE}.tar.gz

ENV PATH=$PATH:/usr/local/go/bin

RUN echo "PATH=${PATH}" >> /etc/environment && chown -R jenkins:jenkins "${JENKINS_AGENT_HOME}" && \
go version
46 changes: 46 additions & 0 deletions updatecli/updatecli.d/debian.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 'deps(dockerfile): bump image "debian" digest'

scms:
default:
kind: github
spec:
user: "{{ .github.user }}"
email: "{{ .github.email }}"
owner: "{{ .github.owner }}"
repository: "{{ .github.repository }}"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
branch: "{{ .github.branch }}"

sources:
bookwormLatestVersion:
kind: dockerimage
name: "Get the latest Debian Bookworm Linux version"
spec:
image: "debian"
tagfilter: "bookworm-*"
versionfilter:
kind: regex
pattern: >-
bookworm-\d+$

targets:
debian:
name: 'deps(dockerfile): bump image "debian"'
kind: dockerfile
spec:
file: dockerfiles/sidekick/Dockerfile
instruction:
keyword: FROM
matcher: debian
sourceid: bookwormLatestVersion

actions:
default:
kind: github/pullrequest
scmid: default
title: Bump Debian Bookworm Linux version to {{ source "bookwormLatestVersion" }}
spec:
labels:
- dependencies
- debian-bookworm
43 changes: 43 additions & 0 deletions updatecli/updatecli.d/gitpod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: 'deps(dockerfile): bump image "gitpod/workspace-full" digest'

scms:
default:
kind: github
spec:
user: "{{ .github.user }}"
email: "{{ .github.email }}"
owner: "{{ .github.owner }}"
repository: "{{ .github.repository }}"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
branch: "{{ .github.branch }}"

sources:
gitpod/workspace-full:
name: get latest image "gitpod/workspace-full"
kind: dockerimage
spec:
image: gitpod/workspace-full
tagfilter: '\d{4}-\d{2}-\d{2}-\d{2}-\d{2}-\d{2}'

targets:
gitpod/workspace-full:
name: 'deps(dockerfile): bump image "gitpod/workspace-full"'
kind: dockerfile
spec:
file: .gitpod/Dockerfile
instruction:
keyword: FROM
matcher: gitpod/workspace-full
sourceid: gitpod/workspace-full

actions:
default:
kind: github/pullrequest
scmid: default
title: Bump Gitpod version to {{ source "gitpod/workspace-full" }}
spec:
labels:
- dependencies
- debian-bookworm
21 changes: 21 additions & 0 deletions updatecli/updatecli.d/ssh-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ sources:
versionfilter:
kind: semver
pattern: '>=5.20.0'

targets:
jenkins/python-agent:
name: '[jenkins/ssh-agent] Bump Docker image tag in "dockerfiles/python/Dockerfile"'
Expand Down Expand Up @@ -74,6 +75,16 @@ targets:
matcher: jenkins/ssh-agent
sourceid: jenkins/ssh-agent
scmid: default
jenkins/golang-agent:
name: '[jenkins/ssh-agent] Bump Docker image tag in "dockerfiles/golang/Dockerfile"'
kind: dockerfile
spec:
file: dockerfiles/golang/Dockerfile
instruction:
keyword: FROM
matcher: jenkins/ssh-agent
sourceid: jenkins/ssh-agent
scmid: default
default-agent:
name: '[jenkins/ssh-agent] Bump Docker image tag in "docker-compose.yaml"'
kind: yaml
Expand All @@ -94,3 +105,13 @@ targets:
key: $.services.default_agent.image
sourceid: jenkins/ssh-agent
scmid: default

actions:
default:
kind: github/pullrequest
scmid: default
title: Bump ssh-agent version to {{ source "jenkins/ssh-agent" }}
spec:
labels:
- dependencies
- debian-bookworm
Loading