[openstreetmap/openstreetmap-website] CSS Error using docker (Issue #3984)
Carlos Magno Oliveira de Abreu
notifications at github.com
Thu Mar 23 11:31:25 UTC 2023
Here is my new Dockerfile to solve some problems like:
1. Yarn is not installed correctly (https://blndxp.wordpress.com/2020/04/28/yarn-install-error-errno-2-no-such-file-or-directory-install/)
2. do the dummy config copy ( and the workaround above)
3. Copy all the app folder to the container so it can be build
```
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
# Install system packages then clean up to minimize image size
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
build-essential \
curl \
default-jre-headless \
file \
firefox-geckodriver \
libarchive-dev \
libffi-dev \
libgd-dev \
libpq-dev \
libsasl2-dev \
libvips-dev \
libxml2-dev \
libxslt1-dev \
locales \
nodejs \
postgresql-client \
ruby2.7 \
ruby2.7-dev \
tzdata \
unzip \
gnupg
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install -y yarn
RUN apt-get -y upgrade
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND=dialog
# Setup app location
RUN mkdir -p /app
WORKDIR /app
COPY ./ /app/
# Install Ruby packages
ADD Gemfile Gemfile.lock /app/
RUN gem install bundler \
&& bundle install
# Install NodeJS packages using yarn
ADD package.json yarn.lock /app/
ADD bin/yarn /app/bin/
RUN yarn config set ignore-engines true
RUN bundle exec yarn install
RUN touch config/settings.local.yml
RUN cp app/assets/stylesheets/common.scss app/assets/stylesheets/ltr/
RUN cp app/assets/stylesheets/common.scss app/assets/stylesheets/rtl/common.r2.scss
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3984#issuecomment-1481026179
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/3984/1481026179 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230323/14c7f934/attachment.htm>
More information about the rails-dev
mailing list