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

Layerfile #93

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
27 changes: 11 additions & 16 deletions Layerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
#This is an example webapp.io configuration for NodeJS
FROM vm/ubuntu:18.04
# To note: Layerfiles create VMs, *not* containers!

# install docker-ce (from tutorial for ubuntu)
RUN apt-get update && \
apt-get install apt-transport-https ca-certificates curl software-properties-common && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" && \
apt-get update && \
apt install docker-ce
# Install node
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash && \
apt install nodejs && \
rm -f /etc/apt/sources.list.d/nodesource.list
RUN npm install -g http-server

# install docker compose
RUN curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose
COPY . .
RUN echo 'hello' > hello.html

# copy the root (i.e., repository root) to /root in the runner
COPY / /root

RUN REPEATABLE docker-compose up -d --build --force-recreate --remove-orphans && sleep 6

EXPOSE WEBSITE localhost:8000
RUN BACKGROUND http-server -p 8000
EXPOSE WEBSITE http://localhost:8000

1 change: 1 addition & 0 deletions services/web/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,4 @@ ReactDOM.render(
<React.StrictMode><Index/></React.StrictMode>,
document.getElementById('root')
);
// I have doen some changes here