Skip to content

Commit db47a7a

Browse files
committed
add images back, and update some of the files
Signed-off-by: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
1 parent 268cc59 commit db47a7a

10 files changed

+115
-8
lines changed

.github/workflows/build_azure_pipelinesrelease_template.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
Validate-unit_test:
7979
name: Unit Test
8080
runs-on: ubuntu-latest
81-
if: !(inputs.skipTests)
81+
if: ! ${{inputs.skipTests}}
8282
steps:
8383
- name: checkout
8484
uses: actions/checkout@v4.1.0
@@ -125,7 +125,7 @@ jobs:
125125
- Validate-xbuild
126126
runs-on:
127127
- self-hosted
128-
if: success() && !(inputs.skipTests)
128+
if: success() && ! ${{inputs.skipTests}}
129129
steps:
130130
- name: checkout
131131
uses: actions/checkout@v4.1.0

.github/workflows/porter-canary.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ jobs:
2323
uses: "./.github/workflows/build_azure_pipelinesrelease_template.yml"
2424
with:
2525
registry: ghcr.io/getporter
26-
shouldPublish: "${{inputs.shouldPublish}}"
27-
skipTests: "${{inputs.skipTests}}"
26+
shouldPublish: ${{inputs.shouldPublish}}
27+
skipTests: ${{inputs.skipTests}}

.github/workflows/test-porter-release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ jobs:
2222
uses: "./.github/workflows/build_azure_pipelinesrelease_template.yml"
2323
with:
2424
registry: ghcr.io/getporter/test
25-
shouldPublish: "${{ inputs.shouldPublish }}"
26-
skipTests: "${{ inputs.skipTests }}"
25+
shouldPublish: ${{ inputs.shouldPublish }}
26+
skipTests: ${{ inputs.skipTests }}

.github/workflows/testporterbot.porter-release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ jobs:
1919
uses: "./.github/workflows/build_azure_pipelinesrelease_template.yml"
2020
with:
2121
registry: ghcr.io/getporter/test
22-
shouldPublish: "${{ inputs.shouldPublish }}"
23-
skipTests: "${{ inputs.skipTests }}"
22+
shouldPublish: ${{ inputs.shouldPublish }}
23+
skipTests: ${{ inputs.skipTests }}

build/images/README.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Porter Docker Images
2+
3+
* client - This provides the porter client installed in a container. See the
4+
[Porter Client Docker Image][client] documentation for examples of how to
5+
use it.
6+
* workshop - This is a container suitable for teaching a workshop on Porter. See
7+
the [Porter Workshop Docker Image][workshop] documentation for examples of
8+
how to use it.
9+
10+
[client]: https://getporter.org/docker-images/client/
11+
[workshop]: https://getporter.org/docker-images/workshop/

build/images/agent/Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
ARG PORTER_VERSION
2+
ARG REGISTRY
3+
FROM $REGISTRY/porter:$PORTER_VERSION
4+
5+
# This is where files that need to be copied into /app/.porter/ should be mounted
6+
VOLUME /porter-config
7+
8+
ENV PORTER_HOME /app/.porter
9+
COPY --chown=65532:0 --chmod=770 bin/dev/agent-linux-amd64 /app/.porter/agent
10+
11+
USER 65532
12+
ENTRYPOINT ["/app/.porter/agent"]

build/images/client/Dockerfile

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM alpine:3 as builder
2+
WORKDIR /app/.porter
3+
4+
RUN mkdir runtimes && \
5+
mkdir -p mixins/exec/runtimes
6+
7+
# Only install porter and the exec mixin, everything else
8+
# must be mounted into the container
9+
COPY bin/dev/porter-linux-amd64 porter
10+
COPY bin/mixins/exec/dev/exec-linux-amd64 mixins/exec/exec
11+
RUN ln -s /app/.porter/porter runtimes/porter-runtime && \
12+
ln -s /app/.porter/mixins/exec/exec mixins/exec/runtimes/exec-runtime
13+
14+
# Copy the porter installation into a distroless container
15+
# Explicitly not using the nonroot tag because we don't want the user to exist so it is placed in the root group
16+
# This allows us to run with a random UID, and access a mounted docker socket (which is only accessible via the root group)
17+
FROM gcr.io/distroless/static
18+
WORKDIR /app
19+
COPY --from=builder --chown=65532:0 --chmod=770 /app/.porter /app/.porter
20+
ENV PATH "$PATH:/app/.porter"
21+
22+
# Run as a nonroot user
23+
USER 65532
24+
ENTRYPOINT ["/app/.porter/porter"]

build/images/server/Dockerfile

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM alpine:3 as builder
2+
ARG TARGETARCH
3+
WORKDIR /app/.porter
4+
5+
RUN mkdir runtimes && \
6+
mkdir -p mixins/exec/runtimes
7+
8+
# Install porter-api-server, agent, and the exec mixin, everything else
9+
COPY bin/dev/porter-api-server-linux-$TARGETARCH porter
10+
COPY bin/dev/agent-linux-$TARGETARCH agent
11+
COPY bin/mixins/exec/dev/exec-linux-$TARGETARCH mixins/exec/exec
12+
RUN ln -s /app/.porter/porter runtimes/porter-runtime && \
13+
ln -s /app/.porter/mixins/exec/exec mixins/exec/runtimes/exec-runtime
14+
15+
# Copy the porter installation into a distroless container
16+
# Explicitly not using the nonroot tag because we don't want the user to exist so it is placed in the root group
17+
# This allows us to run with a random UID, and access a mounted docker socket (which is only accessible via the root group)
18+
FROM gcr.io/distroless/static
19+
WORKDIR /app
20+
COPY --from=builder --chown=65532:0 --chmod=770 /app/.porter /app/.porter
21+
ENV PATH "$PATH:/app/.porter"
22+
# This is where files that need to be copied into /app/.porter/ should be mounted
23+
VOLUME /porter-config
24+
ENV PORTER_HOME /app/.porter
25+
26+
# Run as a nonroot user
27+
USER 65532
28+
ENTRYPOINT ["/app/.porter/agent"]

build/images/workshop/Dockerfile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM docker:dind
2+
3+
ENV HELM_VER v2.17.0
4+
5+
RUN mkdir -p /root/.porter/runtimes && \
6+
mkdir -p /root/.porter/mixins/exec/runtimes
7+
8+
RUN apk add bash \
9+
git \
10+
curl \
11+
bash-completion \
12+
jq \
13+
ca-certificates && \
14+
curl -o helm.tgz https://get.helm.sh/helm-${HELM_VER}-linux-amd64.tar.gz && \
15+
tar -xzf helm.tgz && \
16+
mv linux-amd64/helm /usr/local/bin && \
17+
rm helm.tgz && \
18+
helm init --client-only && \
19+
mkdir -p /workshop
20+
21+
COPY bin/dev/porter-linux-amd64 /root/.porter/porter
22+
COPY bin/mixins/exec/dev/exec-linux-amd64 /root/.porter/mixins/exec/exec
23+
RUN ln -s /root/.porter/porter /root/.porter/runtimes/porter-runtime && \
24+
ln -s /root/.porter/mixins/exec/exec /root/.porter/mixins/exec/runtimes/exec-runtime && \
25+
ln -s /root/.porter/porter /usr/local/bin/porter
26+
27+
WORKDIR /workshop

build/protoc.Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM golang:1.20
2+
RUN apt-get update && apt-get -y install protobuf-compiler
3+
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
4+
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
5+
WORKDIR /proto

0 commit comments

Comments
 (0)