Skip to content
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
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ jobs:
# on your needs.
- name: Configure git for private modules
run: git config --global url."https://speakeasybot:${{ secrets.BOT_REPO_TOKEN }}@github.com".insteadOf "https://github.com"
- name: Login to GitHub Container Registry
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.BOT_REPO_TOKEN }}
- name: Setup Choco
uses: crazy-max/ghaction-chocolatey@2526f467ccbd337d307fe179959cabbeca0bc8c0 # v3.4.0
with:
Expand Down
26 changes: 26 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ builds:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64 # Windows ARM64 can be enabled if needed
ldflags:
- "-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser -X main.artifactArch={{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
archives:
Expand All @@ -32,6 +38,26 @@ changelog:
exclude:
- "^docs:"
- "^test:"

dockers_v2:
- id: speakeasy
dockerfile: Dockerfile
ids: [speakeasy]
images:
- ghcr.io/speakeasy-api/speakeasy
tags:
- "{{ .Tag }}"
- "latest"
platforms:
- linux/amd64
- linux/arm64
labels:
org.opencontainers.image.title: "{{ .ProjectName }}"
org.opencontainers.image.version: "{{ .Version }}"
org.opencontainers.image.revision: "{{ .Commit }}"
org.opencontainers.image.source: "{{ .GitURL }}"
org.opencontainers.image.created: "{{ .Date }}"

brews:
- name: speakeasy
repository:
Expand Down
77 changes: 77 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
FROM alpine:3.21

# Install all system packages in a single layer for better caching and smaller image
RUN apk update && apk add --no-cache \
# Common tools
bash \
curl \
git \
wget \
# Node.js and NPM
nodejs \
npm \
# Python
python3 \
py3-pip \
python3-dev \
pipx \
# Java
openjdk11 \
gradle \
# Ruby (gcompat required for gcc ruby packages like sorbet)
build-base \
ruby \
ruby-bundler \
ruby-dev \
gcompat \
# .NET
dotnet8-sdk \
# PHP and extensions
php83 \
php83-ctype \
php83-dom \
php83-json \
php83-mbstring \
php83-phar \
php83-tokenizer \
php83-xml \
php83-xmlwriter \
php83-curl \
php83-openssl \
php83-iconv \
php83-session \
php83-fileinfo \
# System utilities
sudo \
ca-certificates \
--repository http://nl.alpinelinux.org/alpine/edge/testing/ && \
rm -rf /var/cache/apk/*

# Install .NET 6.0 SDK (in addition to 8.0) and verify installation
ENV DOTNET_ROOT=/usr/lib/dotnet
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -Channel 6.0 -InstallDir ${DOTNET_ROOT} && \
dotnet --list-sdks

# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer

# Install Python package managers: uv and poetry via pipx
RUN pipx install uv && pipx install poetry

# Create a non-root user with sudo access
RUN addgroup -g 1001 speakeasy && \
adduser -u 1001 -G speakeasy -D -s /bin/sh speakeasy && \
echo 'speakeasy ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Copy the binary from GoReleaser build context
# GoReleaser will automatically use the correct binary for the target architecture
COPY speakeasy /usr/local/bin/speakeasy

# Make the binary executable (must be done as root before switching users)
RUN chmod +x /usr/local/bin/speakeasy

USER speakeasy

# Default entrypoint
ENTRYPOINT ["speakeasy"]
CMD ["--version"]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ Install Speakeasy CLI via:
- Winget
- Chocolatey
- Shell Script / GitHub Actions
- Docker

Refer to the [Speakeasy CLI installation documentation](https://www.speakeasy.com/docs/create-client-sdks#install-the-speakeasy-cli) for more information. CLI releases are also directly available in the [repository releases](https://github.com/speakeasy-api/speakeasy/releases).

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ require (
github.com/speakeasy-api/openapi-overlay v0.10.3
github.com/speakeasy-api/sdk-gen-config v1.42.0
github.com/speakeasy-api/speakeasy-client-sdk-go/v3 v3.26.7
github.com/speakeasy-api/speakeasy-core v0.20.9
github.com/speakeasy-api/speakeasy-core v0.20.11
github.com/speakeasy-api/versioning-reports v0.6.1
github.com/spf13/cobra v1.10.1
github.com/spf13/pflag v1.0.9
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,8 @@ github.com/speakeasy-api/sdk-gen-config v1.42.0 h1:L8S8wNQvJP/VlQH4sboC32JNx5uiZ
github.com/speakeasy-api/sdk-gen-config v1.42.0/go.mod h1:kD0NPNX5yaG4j+dcCpLL0hHKQbFk6X93obp+v1XlK5E=
github.com/speakeasy-api/speakeasy-client-sdk-go/v3 v3.26.7 h1:SoWZkRlpFlv8qibCfXWrBZay1JeLS9uqJ+1cu+DFgXo=
github.com/speakeasy-api/speakeasy-client-sdk-go/v3 v3.26.7/go.mod h1:k9JD6Rj0+Iizc5COoLZHyRIOGGITpKZ2qBuFFO8SqNI=
github.com/speakeasy-api/speakeasy-core v0.20.9 h1:khs1KjvQ1Ery5tJulDL/jCphsGrFq4TJpt0no9lY760=
github.com/speakeasy-api/speakeasy-core v0.20.9/go.mod h1:kaCtgPT2W9elitI4VgzLqqebjGSg0qVVj6N7VGJUAJg=
github.com/speakeasy-api/speakeasy-core v0.20.11 h1:IGAyVYnmz4eP6MlzfVOjnjBcOWuudYjAkxGQOgjt3AY=
github.com/speakeasy-api/speakeasy-core v0.20.11/go.mod h1:kaCtgPT2W9elitI4VgzLqqebjGSg0qVVj6N7VGJUAJg=
github.com/speakeasy-api/versioning-reports v0.6.1 h1:pvuvA1IFO7PVlpdFh7J2Y3hENDzhISFdNy0NVg/Cxb4=
github.com/speakeasy-api/versioning-reports v0.6.1/go.mod h1:LW5FABrvi5SBbeiD3HJYw0JZYe6Rw2Xna59pFJ2BmLI=
github.com/spewerspew/spew v0.0.0-20230513223542-89b69fbbe2bd h1:csraKifkLpqDClUIbFTetjtraueL1KUhKBm6okL+ug4=
Expand Down
Loading