-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
32 lines (26 loc) · 1011 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#
# Copyright (c) 2020-2023 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
ARG extension_image
FROM registry.access.redhat.com/ubi8/${extension_image}
ARG extension_repository
ARG extension_revision
ARG extension_name
ARG extension_manager
ARG extension_vsce
USER root
WORKDIR /
RUN npm install -g ${extension_manager}
RUN mkdir ./${extension_name}-src && cd ./${extension_name}-src && \
git clone ${extension_repository} ${extension_name} && \
cd ./${extension_name} && git checkout ${extension_revision} && \
npm install -g @vscode/vsce@${extension_vsce} [email protected] && \
if [[ -f yarn.lock ]]; then yarn install; \
else npm install --unsafe-perm=true --allow-root; fi && \
rm -rf ./.git && tar -czvf /${extension_name}-sources.tar.gz ./ && \
vsce package --out /${extension_name}.vsix