Skip to content

Instantly share code, notes, and snippets.

@fkmt-disk fkmt-disk/Dockerfile Secret
Last active Jul 8, 2018

Embed
What would you like to do?
version: "3"
services:
cloud9:
build:
context: "."
ports:
- "8181:8181"
volumes:
- "./workspace:/root/workspace"
command: "node /c9sdk/server.js -w /root/workspace --port 8181 --listen 0.0.0.0 --auth :"
FROM centos:7
# install dependencies
RUN yum install -y epel-release
RUN yum groupinstall -y development
RUN yum install -y git glibc-static which nodejs python-devel java-1.8.0-openjdk maven
RUN yum install -y python2-pip && pip install --upgrade pip
# install cloud9
RUN git clone https://github.com/c9/core.git /c9sdk && cd /c9sdk && scripts/install-sdk.sh
# install aws-cli
RUN pip install --upgrade awscli
RUN mkdir /root/.aws
COPY aws /root/.aws/
RUN chown -R root:root /root/.aws && chmod 600 /root/.aws/*
# install localstack
RUN pip install --upgrade localstack
RUN useradd localstack
RUN mkdir /home/localstack/tmp && chown -R localstack:localstack /home/localstack/tmp
RUN echo 'alias start-localstack="DATA_DIR=/home/localstack/tmp DEFAULT_REGION=ap-northeast-1 SERVICES=s3,dynamodb nohup localstack start > /tmp/localstack.log 2>&1 &"' >> /root/.bash_profile
RUN echo 'alias stop-localstack="kill -s INT $(ps aux | grep "localstack start" | grep -v grep | awk '\''$0=$2'\'')"' >> /root/.bash_profile
# install apex
RUN curl https://raw.githubusercontent.com/apex/apex/master/install.sh | sh
# prepare workspace
RUN mkdir /root/workspace
WORKDIR /root/workspace
EXPOSE 8181
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.