forked from hausgold/grape-jwt-authentication
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (23 loc) · 872 Bytes
/
Dockerfile
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
FROM hausgold/ruby:2.5
MAINTAINER Hermann Mayer <[email protected]>
# Update system gem
RUN gem update --system '3.3.26'
# Install system packages and the latest bundler
RUN apt-get update -yqqq && \
apt-get install -y \
build-essential locales sudo vim \
ca-certificates \
bash-completion inotify-tools && \
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && /usr/sbin/locale-gen && \
gem install bundler -v '~> 2.3.0' --no-document --no-prerelease
# Add new web user
RUN mkdir /app && \
adduser web --home /home/web --shell /bin/bash \
--disabled-password --gecos ""
COPY config/docker/* /home/web/
RUN chown web:web -R /app /home/web /usr/local/bundle && \
mkdir -p /home/web/.ssh
# Set the root password and grant root access to web
RUN echo 'root:root' | chpasswd
RUN echo 'web ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
WORKDIR /app