mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 10:02:56 +01:00
Currently the `gsutil rsync` command does not support the `-z` or `-Z` options available in `gsutil cp` to compress files locally via gzip before uploading (https://github.com/GoogleCloudPlatform/gsutil/issues/579). As https://cloud.google.com/storage/docs/gsutil/commands/cp states: When you specify the -z option, the data from your files is compressed before it is uploaded, but your actual files are left uncompressed on the local disk. The uploaded objects retain the Content-Type and name of the original files, but have their Content-Encoding metadata set to gzip to indicate that the object data stored are compressed on the Cloud Storage servers and have their Cache-Control metadata set to no-transform. about.gitlab.com is currently serving uncompressed HTML files because `Cache-Control: max-age=0` is set (see https://gitlab.com/gitlab-com/www-gitlab-com/-/merge_requests/87045), and Fastly has a custom rule to skip HTML files and therefore won't cache them. This patches the `rsync.py` using https://github.com/GoogleCloudPlatform/gsutil/pull/1430 to support these command-line options so local gzip compression can be performed. Relates to https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/14852
18 lines
627 B
Docker
18 lines
627 B
Docker
FROM gcr.io/google.com/cloudsdktool/cloud-sdk as gcloud-sdk
|
|
|
|
FROM ruby:3.0.3-slim-buster
|
|
|
|
# Install Google Cloud SDK for deploys via rsync
|
|
COPY --from=gcloud-sdk /usr/lib/google-cloud-sdk /usr/lib/google-cloud-sdk
|
|
COPY --from=gcloud-sdk /usr/share/google-cloud-sdk /usr/share/google-cloud-sdk
|
|
RUN cd /usr/bin && find ../lib/google-cloud-sdk/bin -type f -executable -exec ln -s {} \;; cd -
|
|
|
|
ADD /scripts/ /scripts/
|
|
ADD /patches /patches/
|
|
RUN /scripts/install-www-gitlab-com
|
|
|
|
# Set UTF-8 http://jaredmarkell.com/docker-and-locales/
|
|
# Must be set after install-essentials is run
|
|
ENV LANG C.UTF-8
|
|
ENV LANGUAGE C
|
|
ENV LC_ALL C.UTF-8
|