diff --git a/images/taginfo/Dockerfile b/images/taginfo/Dockerfile index f94a8c2f..84505181 100644 --- a/images/taginfo/Dockerfile +++ b/images/taginfo/Dockerfile @@ -1,13 +1,7 @@ -FROM ruby:2.4 -ENV workdir /apps +FROM ruby:3.3 as builder +ARG workdir=/usr/src/app WORKDIR $workdir RUN apt-get update && apt-get install -y \ - curl \ - sqlite3 \ - sqlite3-pcre \ - ruby-passenger \ - libapache2-mod-passenger \ - git \ cmake \ libbz2-dev \ libexpat1-dev \ @@ -18,17 +12,14 @@ RUN apt-get update && apt-get install -y \ libsqlite3-dev \ make \ zlib1g-dev \ - jq \ - ca-certificates \ - osmium-tool \ - pyosmium \ - rsync \ - tmux \ - zsh \ - python3-pip \ - && rm -rf /var/lib/apt/lists/* - -RUN pip3 install awscli + curl \ + sqlite3 \ + sqlite3-pcre \ + passenger \ + libapache2-mod-passenger \ + git \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* # Clone and setup taginfo-tools RUN git clone https://github.com/taginfo/taginfo-tools.git $workdir/taginfo-tools && \ @@ -37,14 +28,28 @@ RUN git clone https://github.com/taginfo/taginfo-tools.git $workdir/taginfo-tool mkdir build && cd build && \ cmake .. && make +RUN apt-get update && apt-get install -y passenger libapache2-mod-passenger git jq python3-pip +RUN apt-get clean && rm -rf /var/lib/apt/lists/* + +RUN gem install json rack-contrib puma +RUN gem install sinatra -v '< 3' +RUN gem install sinatra-r18n -v '5.0.2' + +# Install AWS CLI +RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ + unzip awscliv2.zip && \ + ./aws/install + # Clone and setup taginfo RUN git clone https://github.com/taginfo/taginfo.git $workdir/taginfo && \ cd $workdir/taginfo && \ - git checkout ae5a950f7aa4c0de4e706839619a1dc05fc4450a && \ - echo "gem 'thin' " >> Gemfile && \ - gem install bundler -v 2.3.27 && \ bundle install -COPY overwrite_config.py $workdir/ -COPY start.sh $workdir/ -CMD $workdir/start.sh +COPY config/taginfo-config.json $workdir/ + +COPY overwrite_config.py $workdir/scripts/ +COPY start.sh $workdir/scripts/ + +# COPY overwrite_config.py . +# COPY start.sh . +# sqlite3 sqlite3-pcre \ No newline at end of file