Skip to content

Commit

Permalink
Add env var to dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: thepetk <thepetk@gmail.com>
  • Loading branch information
thepetk committed Nov 24, 2023
1 parent 26386e4 commit 58e5689
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 4 additions & 0 deletions index/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ RUN set -x ; \
# Modify the permissions on the necessary files to allow the container to properly run as a non-root UID
RUN mkdir -p /www/data && chmod -R g+rwx /www/data

# disable http/2 on the index server by default
ARG ENABLE_HTTP2=false
ENV ENABLE_HTTP2=${ENABLE_HTTP2}

# Set env vars for the locations of the devfile stacks and index.json
ENV DEVFILE_STACKS /registry/stacks
ENV DEVFILE_SAMPLES /registry/samples
Expand Down
5 changes: 1 addition & 4 deletions index/server/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Environment variable which enables http2 protocol
ENABLE_HTTP2 ?= false

# Build the index container for the registry
buildfolder="$(realpath $(dirname ${BASH_SOURCE[0]}))"

# Generate OpenAPI endpoint and type definitions
bash ${buildfolder}/codegen.sh

# Build the index server
docker build -t devfile-index-base:latest $buildfolder --build-arg ENABLE_HTTP2=${ENABLE_HTTP2}
docker build -t devfile-index-base:latest --build-arg ENABLE_HTTP2=${ENABLE_HTTP2} $buildfolder

0 comments on commit 58e5689

Please sign in to comment.