-
Notifications
You must be signed in to change notification settings - Fork 4
Bonus
VBrazhnik edited this page Jul 21, 2018
·
4 revisions
Answer
FROM debian
MAINTAINER vbrazhni <[email protected]>
RUN apt-get update && apt-get install -y cowsay fortune lolcat
ENTRYPOINT /usr/games/fortune | /usr/games/cowsay | /usr/games/lolcat
# How to build it?
# docker build -t a00 .
# How to run it?
# docker run --rm -t a00
Explanation
fortune
is a program that displays a pseudorandom message from a database of quotations that first appeared in Version 7 Unix.
cowsay
is a program that generates ASCII pictures of a cow with a message.
lolcat produces rainbow of colors in terminal.
Flag -t
is important in docker run --rm -t a00
command. Without this flag cow will get no color.
Answer
FROM debian
MAINTAINER vbrazhni <[email protected]>
RUN apt-get update && apt-get upgrade -y && apt-get install -y build-essential git
# How to build it?
# docker build -t a01 .
# How to run it?
# docker run --rm -ti a01
Answer
FROM debian
MAINTAINER vbrazhni <[email protected]>
RUN apt-get update && apt-get upgrade -y && apt-get install -y wget default-jre
WORKDIR minecraft
RUN wget https://launcher.mojang.com/mc/game/1.13/server/d0caafb8438ebd206f99930cfaecfa6c9a13dca0/server.jar
RUN echo 'eula=true' > eula.txt
EXPOSE 25565
ENTRYPOINT java -Xmx1024M -Xms1024M -jar server.jar
# How to build it?
# docker build -t a02 .
# How to run it?
# docker run --rm -d -p 25565:25565 a02
Link to jar file was provided by Official site | Minecraft.
Answer
FROM ubuntu
MAINTAINER vbrazhni <[email protected]>
RUN apt-get update && apt-get upgrade -y && apt-get install -y nodejs npm git vim emacs
RUN npm install yarn --global && npm install npm --global
# How to build it?
# docker build -t a03 .
# How to run it?
# docker run --rm -ti a03
Answer
FROM ubuntu
MAINTAINER vbrazhni <[email protected]>
RUN apt-get update && apt-get upgrade -y && apt-get install -y default-jdk default-jre git vim emacs
# How to build it?
# docker build -t a04 .
# How to run it?
# docker run --rm -ti a04