-
-
Save addaleax/2e67d0dfedda3eb34c4407bd97e421f0 to your computer and use it in GitHub Desktop.
CentOS 7 Compass Test Dockerfile (Electron 13 branch)
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
# run as: | |
# docker build -t centos7-compass-test -f centos7-compass.Dockerfile . | |
# docker run --rm -it --network host --privileged -v /tmp:/tmp centos7-compass-test -c 'DISPLAY=:1 mongodb-compass-dev' | |
FROM centos:7 | |
RUN yum install -y centos-release-scl epel-release | |
RUN yum repolist | |
RUN yum install -y python3 rpm-build dpkg-devel dpkg-dev cmake devtoolset-8 git | |
RUN scl enable devtoolset-8 bash | |
RUN bash -c 'source /opt/rh/devtoolset-8/enable && g++ --version && git --version' | |
# Compass-specific | |
RUN yum install -y libsecret-devel alsa-lib krb5-devel | |
# Add Node.js | |
RUN curl -sL https://rpm.nodesource.com/setup_14.x | bash - | |
RUN yum install -y nodejs | |
RUN npm install -g npm@7.19.x | |
# Clone Compass | |
RUN git clone --depth 10 --branch electron-13-same-keytar-node-14 https://github.com/mongodb-js/compass.git | |
RUN bash -c 'source /opt/rh/devtoolset-8/enable && cd compass && npm run bootstrap' | |
RUN bash -c 'source /opt/rh/devtoolset-8/enable && cd compass && npm run package-compass' | |
# Install Compass | |
RUN yum install -y compass/packages/compass/dist/mongodb-compass-dev-0.0.0-dev.0.x86_64.rpm | |
RUN chmod 4755 /usr/lib/mongodb-compass-dev/chrome-sandbox | |
RUN adduser test | |
USER test | |
ENTRYPOINT [ "bash" ] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment