-
Notifications
You must be signed in to change notification settings - Fork 727
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update codegen task to be runnable via CI (#1944)
- Loading branch information
Showing
2 changed files
with
45 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
ARG NODE_JS_VERSION=18 | ||
FROM node:${NODE_JS_VERSION} | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
ARG BUILDER_UID=1000 | ||
ARG BUILDER_GID=1000 | ||
ENV BUILDER_USER elastic | ||
ENV BUILDER_GROUP elastic | ||
|
||
RUN apt-get clean -y | ||
RUN apt-get update -y | ||
RUN apt-get install -y zip | ||
# install zip util | ||
RUN apt-get clean -y && \ | ||
apt-get update -y && \ | ||
apt-get install -y zip | ||
|
||
# Set user permissions and directory | ||
RUN groupadd --system -g ${BUILDER_GID} ${BUILDER_GROUP} \ | ||
&& useradd --system --shell /bin/bash -u ${BUILDER_UID} -g ${BUILDER_GROUP} -m elastic 1>/dev/null 2>/dev/null \ | ||
&& mkdir -p /usr/src/elasticsearch-js \ | ||
&& chown -R ${BUILDER_USER}:${BUILDER_GROUP} /usr/src/ | ||
WORKDIR /usr/src/elasticsearch-js | ||
USER ${BUILDER_USER}:${BUILDER_GROUP} | ||
|
||
# Install app dependencies | ||
COPY package*.json ./ | ||
COPY --chown=$BUILDER_USER:$BUILDER_GROUP package*.json ./ | ||
RUN npm install | ||
|
||
COPY . . | ||
COPY --chown=$BUILDER_USER:$BUILDER_GROUP . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters