Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/new base image #295

Merged
merged 5 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 4 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
FROM quay.io/cdis/ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive

# need libcap2-bin so we can do setcap later
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
sudo \
vim \
libcap2-bin \
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/* \
&& npm install -g npm@8
FROM 707767160287.dkr.ecr.us-east-1.amazonaws.com/gen3/nodejs-base:master

COPY . /guppy/
WORKDIR /guppy
Expand All @@ -24,11 +8,11 @@ RUN VERSION=`git describe --always --tags` && echo "export const gitVersion =\"$
RUN /bin/rm -rf .git
RUN /bin/rm -rf node_modules

RUN useradd -d /guppy gen3 && chown -R gen3: /guppy
RUN chown -R gen3: /guppy
# see https://superuser.com/questions/710253/allow-non-root-process-to-bind-to-port-80-and-443
RUN setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/node
RUN setcap CAP_NET_BIND_SERVICE=+eip "$NVM_DIR/versions/node/$NODE_VERSION/bin/node"
USER gen3
RUN npm ci
RUN source $NVM_DIR/nvm.sh && npm ci
RUN npm run-script prepare

EXPOSE 3000
Expand Down
Loading
Loading