Skip to content

Commit

Permalink
Repository: Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenix147 committed Mar 1, 2024
1 parent 5e63144 commit 1b72782
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]

0 comments on commit 1b72782

Please sign in to comment.