Skip to content

Commit

Permalink
Update taginfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Jan 5, 2024
1 parent 0ec6317 commit 7b5ea6b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 30 deletions.
61 changes: 31 additions & 30 deletions images/taginfo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
# Use a specific version of the ruby image for better reproducibility
FROM ruby:3.0
ENV workdir /apps

# Install Taginfo site
RUN apt-get update && apt-get -y install \
# Set the working directory
WORKDIR /apps

# Update and install dependencies in a single layer to reduce image size
RUN apt-get update && apt-get install -y \
curl \
sqlite3 \
sqlite3-pcre \
ruby-passenger \
libapache2-mod-passenger \
git

# Commit ae5a950f7aa4c0de4e706839619a1dc05fc4450a, at 2021-10-18
RUN git clone https://github.com/taginfo/taginfo.git $workdir/taginfo
WORKDIR $workdir/taginfo
RUN git checkout ae5a950f7aa4c0de4e706839619a1dc05fc4450a
RUN echo "gem 'thin' " >>Gemfile
RUN gem install bundler
RUN bundle install

# Install Taginfo tools
RUN apt-get -y install \
git \
cmake \
libbz2-dev \
libexpat1-dev \
Expand All @@ -31,25 +23,34 @@ RUN apt-get -y install \
make \
zlib1g-dev \
jq \
ca-certificates

# Other useful packages
RUN apt-get install -y \
git \
ca-certificates \
osmium-tool \
pyosmium \
rsync \
tmux \
zsh
zsh \
nano \
vim \
&& rm -rf /var/lib/apt/lists/*

# Clone and set up Taginfo
RUN git clone https://github.com/taginfo/taginfo.git taginfo \
&& cd taginfo \
# && echo "gem 'thin'" >> Gemfile \
&& gem install bundler \
&& bundle install

RUN git clone https://github.com/taginfo/taginfo-tools.git $workdir/taginfo-tools
WORKDIR $workdir/taginfo-tools
RUN git submodule update --init
RUN mkdir build && cd build && cmake .. && make
# Clone and set up Taginfo tools
RUN git clone https://github.com/taginfo/taginfo-tools.git taginfo-tools \
&& cd taginfo-tools \
&& git submodule update --init \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make

RUN apt-get install -y nano vim
COPY overwrite_config.py $workdir/
COPY start.sh $workdir/
# Copy necessary files
COPY overwrite_config.py start.sh ./

WORKDIR $workdir/
CMD $workdir/start.sh
# Set the command to start the application
CMD ["./start.sh"]
1 change: 1 addition & 0 deletions images/taginfo/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -xe

WORKDIR=/apps
DATA_DIR=$WORKDIR/data
Expand Down

0 comments on commit 7b5ea6b

Please sign in to comment.