Skip to content
Merged
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
16 changes: 6 additions & 10 deletions dockerfiles/ts.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# While reading this file you might be wondering, hmmm.. this looks a lot like go.Dockerfile, well.. it does!
# The author (git blame to reveal) prefers some copying over templating the Dockerfiles.

# Build in a full featured container
FROM node:16 as build
FROM node:22-bullseye AS build

# Install protobuf compiler
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends --assume-yes \
protobuf-compiler=3.6.1.3-2* libprotobuf-dev=3.6.1.3-2*
protobuf-compiler=3.12.4* libprotobuf-dev=3.12.4*

# Get go compiler
ARG PLATFORM=amd64
Expand Down Expand Up @@ -44,15 +40,15 @@ COPY ./${REPO_DIR_OR_PLACEHOLDER} ./${REPO_DIR_OR_PLACEHOLDER}
# Prepare the feature for running
RUN CGO_ENABLED=0 ./temporal-features prepare --lang ts --dir prepared --version "$SDK_VERSION"

################################################################################

# Copy the CLI and prepared feature to a distroless "run" container
FROM gcr.io/distroless/nodejs:16
FROM node:22-bullseye

COPY --from=build /app/temporal-features /app/temporal-features
COPY --from=build /app/features /app/features
COPY --from=build /app/prepared /app/prepared
COPY --from=build /app/${REPO_DIR_OR_PLACEHOLDER} /app/${REPO_DIR_OR_PLACEHOLDER}

# Node is installed here 👇 in distroless
ENV PATH="/nodejs/bin"
# Use entrypoint instead of command to "bake" the default command options
ENTRYPOINT ["/app/temporal-features", "run", "--lang", "ts", "--prepared-dir", "prepared"]
Loading