Skip to content

Instantly share code, notes, and snippets.

@kevingo
Last active July 20, 2023 17:00
Show Gist options
  • Select an option

  • Save kevingo/6017d641e5492e98bee570b77e2ba258 to your computer and use it in GitHub Desktop.

Select an option

Save kevingo/6017d641e5492e98bee570b77e2ba258 to your computer and use it in GitHub Desktop.
Install Redis with Docker in Ubuntu 14.04

1. Create Docekrfile

mkdir redis && touch Dockerfile

2. Create Redis Dockerfile

FROM        ubuntu:14.04
RUN         apt-get update && apt-get install -y redis-server
EXPOSE      6379
ENTRYPOINT  ["/usr/bin/redis-server"]

3. Build redis images

docker build -t <your username>/redis .

4. Run redis with expose 6379 port

docker run -d --name redis -p 6379:6379 dockerfile/redis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment