-
-
Save Resonious/95b3cc7b971f30210ebf8c420f63315c to your computer and use it in GitHub Desktop.
Debian-based Dockerfile.kaiser for hats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.6.5 | |
ENV _GIT_REVISION='development (kaiser)' | |
ARG UID=1000 | |
# Setup 'app' user | |
RUN mkdir -p /app && \ | |
useradd -U -u $UID --home-dir /app app && \ | |
echo 'gem: --no-rdoc --no-ri' > ~/.gemrc | |
# Install system packages | |
RUN apt-get update && apt-get install -y curl git build-essential | |
# Install NPM | |
RUN wget https://nodejs.org/dist/v10.16.3/node-v10.16.3-linux-x64.tar.xz && \ | |
tar -xf node-v10.16.3-linux-x64.tar.xz && \ | |
cp -r node-v10.16.3-linux-x64/bin/* /usr/bin/ && \ | |
cp -r node-v10.16.3-linux-x64/lib/* /usr/lib/ && \ | |
cp -r node-v10.16.3-linux-x64/share/* /usr/share/ | |
# Install yarn | |
RUN npm install -g yarn | |
RUN cd /app && ls | |
WORKDIR /app | |
ENV CONTAINER=true | |
ADD yarn.lock package.json /app/ | |
RUN chown -R app /app && chgrp -R app /app | |
USER app | |
RUN yarn | |
EXPOSE 9000 | |
CMD ["sh", "-c", "bin/webpack && rails s -p 9000 -b 0.0.0.0"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment