-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (27 loc) · 859 Bytes
/
Dockerfile
File metadata and controls
32 lines (27 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM ruby:2.6.3-alpine
# Install system dependencies
RUN apk --update add \
build-base \
mariadb-dev \
postgresql-dev \
sqlite-dev \
su-exec \
tini && \
gem update --system && \
gem install bundler:1.17.2 && \
rm -rf /var/cache/apk/*
# Create gemstash user
ENV GEMSTASH_USER="gemstash"
ENV GEMSTASH_HOME="/home/${GEMSTASH_USER}"
RUN addgroup -g "9999" "${GEMSTASH_USER}" && \
adduser -S -D -u "9999" -G "${GEMSTASH_USER}" "${GEMSTASH_USER}"
# Install Gemstash
RUN mkdir -p "${GEMSTASH_HOME}/app"
WORKDIR "${GEMSTASH_HOME}/app"
COPY "app/" "${GEMSTASH_HOME}/app"
RUN bundle install --jobs 4 --retry 3
VOLUME "${GEMSTASH_HOME}/data"
EXPOSE 9292
USER ${GEMSTASH_USER}:${GEMSTASH_USER}
ENTRYPOINT ["tini", "--"]
CMD ["bundle", "exec", "gemstash", "start", "--no-daemonize", "--config-file=config.yml.erb"]