Commit c17eb161 authored by Vic Garcia's avatar Vic Garcia

Example: Building a Docker Image

Uses vanilla docker to build a very simple
web server
parent 3a9812b5
Pipeline #75613564 passed with stage
in 1 minute and 30 seconds
......@@ -8,4 +8,6 @@ build:
- docker:dind
- docker version
\ No newline at end of file
# build the image and tag it to use the GitLab CI docker registry
- docker build . -t "${CI_REGISTRY_IMAGE}/hello:${CI_COMMIT_SHORT_SHA}"
- docker images # list the images the docker services knows about
# minimal linux distribution with official node image
FROM node:11-alpine
# Install the 'serve' npm package
RUN npm install -g serve
COPY public public
# When the container starts, serve the public/ dir
ENTRYPOINT [ "serve", "-n", "public/" ]
<h1>Hello world docker</h1>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment