-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e63144
commit 1b72782
Showing
1 changed file
with
5 additions
and
22 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 |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
|
||
FROM mhart/alpine-node:16.4.2 \ | ||
FROM node:20-alpine \ | ||
AS build | ||
|
||
ENV USER=appuser | ||
|
@@ -40,31 +40,14 @@ RUN adduser \ | |
"${USER}" | ||
|
||
RUN apk update \ | ||
&& apk add --no-cache ca-certificates python3 gcc g++ make linux-headers \ | ||
&& update-ca-certificates \ | ||
&& ln -sf python3 /usr/bin/python \ | ||
&& npm i -g pkg -D -S \ | ||
&& pkg -v | ||
&& apk add --no-cache ca-certificates \ | ||
&& update-ca-certificates | ||
|
||
WORKDIR '/app' | ||
|
||
# npm install node-musl \ | ||
# && | ||
|
||
RUN npm install [email protected] \ | ||
RUN npm install -g [email protected] \ | ||
&& npx swagger-typescript-api --version | ||
|
||
RUN pkg -t node18-linuxstatic node_modules/.bin/swagger-typescript-api \ | ||
&& ./swagger-typescript-api --help | ||
|
||
FROM scratch \ | ||
AS image | ||
|
||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY --from=build /etc/passwd /etc/passwd | ||
COPY --from=build /etc/group /etc/group | ||
COPY --from=build /app/swagger-typescript-api /sta | ||
|
||
USER appuser:appuser | ||
ENTRYPOINT ["/sta"] | ||
ENTRYPOINT ["sta"] | ||
CMD ["--help"] |