Sha256: c0cd4f83f4d237c30f1bf70a3da44fdc05c75682f1bf45c749d087ef7848c351

Contents?: true

Size: 661 Bytes

Versions: 1

Compression:

Stored size: 661 Bytes

Contents

FROM ubuntu:bionic as builder

RUN apt-get update -y && \
  apt-get install -y \
    build-essential \
    curl

RUN cd /tmp && \
  curl -O http://download.redis.io/redis-stable.tar.gz && \
  tar xvzf redis-stable.tar.gz && \
  cd redis-stable && \
  make && \
  chmod 755 src/redis-cli

FROM ubuntu:bionic

# Install nc for web serving
RUN apt-get update -y && apt-get install -y netcat curl

# Install redis-cli
COPY --from=builder /tmp/redis-stable/src/redis-cli /usr/local/bin/

# Serve the date and a counter
EXPOSE 8080
CMD while true ; do nc -l -p 8080 -c 'echo "HTTP/1.1 200 OK\n\n$(date)\nVisit count: $(redis-cli -h redis incr visit_counter)"' ; done

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-docker-compose-1.5.1 example/app/Dockerfile