mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
31 lines
1.1 KiB
Docker
31 lines
1.1 KiB
Docker
# Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
# Licensed under the GNU Affero General Public License (AGPL).
|
|
# See License.AGPL.txt in the project root for license information.
|
|
|
|
FROM cgr.dev/chainguard/wolfi-base:latest@sha256:e1d402d624011d0f4439bfb0d46a3ddc692465103c7234a326e0194953c3cfe0 as compress
|
|
|
|
RUN apk add brotli gzip
|
|
|
|
COPY components-dashboard--app/build /www
|
|
|
|
WORKDIR /www
|
|
|
|
RUN find . -type f \( -name '*.html' -o -name '*.js' -o -name '*.css' -o -name '*.png' -o -name '*.svg' -o -name '*.map' -o -name '*.json' \) \
|
|
-exec /bin/sh -c 'gzip -v -f -9 -k "$1"' /bin/sh {} \;
|
|
|
|
RUN find . -type f \( -name '*.html' -o -name '*.js' -o -name '*.css' -o -name '*.png' -o -name '*.svg' -o -name '*.map' -o -name '*.json' \) \
|
|
-exec /bin/sh -c 'brotli -v -q 11 -o "$1.br" "$1"' /bin/sh {} \;
|
|
|
|
COPY components-gitpod-protocol--gitpod-schema/gitpod-schema.json /www/static/schemas/gitpod-schema.json
|
|
|
|
FROM caddy/caddy:2.9.1-alpine
|
|
|
|
COPY components-dashboard--static/conf/Caddyfile /etc/caddy/Caddyfile
|
|
COPY --from=compress /www /www
|
|
|
|
ARG __GIT_COMMIT
|
|
ARG VERSION
|
|
|
|
ENV GITPOD_BUILD_GIT_COMMIT=${__GIT_COMMIT}
|
|
ENV GITPOD_BUILD_VERSION=${VERSION}
|