@denisroy
I mean its exactly the same as the tutorial.
docker-compose.yml
iversion: "3"
services:
web:
image: mjwrazor/repository:4
deploy:
replicas: 5
resources:
limits:
cpus: "0.1"
memory: 50M
restart_policy:
condition: on-failure
ports:
- "80:80"
networks:
- webnet
networks:
webnet:
Dockerfile
`# Use an official Python runtime as a base image
FROM python:2.7-slim
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
ADD . /app
# Install any needed packages specified in requirements.txt
RUN pip install -r requirements.txt
# Make port 80 available to the world outside this container
EXPOSE 80
# Define environment variable
ENV NAME World
# Run app.py when the container launches
CMD ["python", "app.py"]`
There is no extension on the Dockerfile
right?
I ran the commands in exact sequence given in the tutorial. I went back to do it again. When I make changes do I need to bump the tag an push every time? Or can I just make changes and only create a new tag when I want to? app.py is exact copy of the tutorial code.
When I try docker swarm init
after restarting I get
Error response from daemon: This node is already part of a swarm. Use "docker swarm l join another one.