Docker Compose Build Target

Compose and Docker compatibility matrix. Forwards the exposed port 80 on the container to the external port 80 on the host machine. Let's look at the Makefile we will be using, specifically the build target: ## Build binary and docker images build: @stack build. A build and deployment pipeline with Maven, Docker and Jenkins This is a little story about setting up a build and deployment pipeline for a small service. This document describes the steps used to install the Docker Compose package within the NX-OS Bash shell. Once the project is build, you can run the docker-compose build command to build the docker image. Builds an image from a given dockerfile. The purpose of this guide is to have a working Docker setup with Angular CLI while using Pug. Target flow in ECS ECS steps run in an agent container (cloudbees/java-build-tools:0. Now, to test the client, run docker-compose up from a Terminal and after the Docker-image is done building, you should be forwarded to the app we just created. I can then build that image using the Dockerfile, push it to my docker registry, then tell my target host to pull the latest image, and then run the image. Finally, we copy the jar file to Solr container at directory /opt/solr/dist. docker-compose -f. Using docker-compose from the directory container docker-compose. When petstore is generated, a folder called docker with two default Dockerfiles were generated at the same time for any further customization. プログラミングに関係のない質問 やってほしいことだけを記載した丸投げの質問 問題・課題が含まれていない質問 意図的に内容が抹消された質問 広告と受け取られるような投稿. yml specification. Designed to be cross-compatible between Compose and the Docker Engine’s swarm mode, version 3 removes several options and adds several more. Many local groups are organizing meetups to watch the livestream together but you are also welcome to join us online. Runs a command in a running container. We could've done this with a user_data section of our Terraform build so the new instance would come fully formed with docker & docker-compose. Compose file version 2 reference Estimated reading time: 43 minutes Reference and guidelines. Then after I’ve made some changes to the custom dockerfile and run docker-compose build again it uses the old container again, not making any changes. The containers will be running in the background because of the -d flag. moby/moby#32496 @dnephin Add target property to build So only version 3. The Docker container engine provides for the execution of applications composed as Docker images. docker-compose will take a look at the docker-compose. This technology allows users to interact with the services of an application by using a Yamal Ain`t Markup Language (YAMAL) based Compose file. Run maven command - clean install, and a jar file gets created in the target folder. Initializes two environment variables (CatalogUrl and OrderingUrl). Deploying with Docker Compose. Docker Compose - Hashicorp's Vault and Consul Part B (EaaS, dynamic secrets, leases, and revocation) Docker Compose - Hashicorp's Vault and Consul Part C (Consul) Docker Compose with two containers - Flask REST API service container and an Apache server container Docker compose : Nginx reverse proxy with multiple containers. How I build fast a dashboard (docker, docker compose, json-server and smashing) Main points I use smashing. docker/docker-compose. These topics describe version 2 of the Compose file format. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. docker-compose -f. Compose and Docker compatibility matrix. If a matching target path exists already as part of the container image, it will be overwritten by the mounted path. docker-compose. Also see docker/compose#2957 (comment), which goes a bit deeper into "what happens under the hood" All the other steps are the same as the previous example, so if the volume is empty, but the container has files at the target location, those files (and their attributes) are copied on first run. and should see. • Build/Maintaining Docker container clusters managed by Kubernetes Linux, Bash, GIT, Docker, on GCP. share | improve this question. To start the containers, we use. As we don't want to run all container using the docker service command, we build a docker-compose file step by step, to have a complete deployment file to start our Docker Swarm monitoring. The Visual Studio Code Remote - Containers extension lets you use a Docker container as a full-featured development environment. TARGET is the URL of the web service under test. This hierarchy of modules can be nested. This article is part of a series: Docker — from the beginning part I, this covers why Docker, the basic concepts and the commands we need to manage things like images and containers. docker for windows -- kubernetes. Depending on the service, you might only want the published port to remain inside the private docker network, and not exposed to the. The Docker Support Options dialog appears. Now lets run it! # docker-compose up -d Creating network "orleansdocker_default" with the default driver Creating orleansdocker_orleans-silo. You can customize how Visual Studio builds your container projects by setting the properties that MSBuild uses to build your project. docker/docker-compose. - docker-compose -f docker-compose. In the build plan, we create artifact i. References Command Line ; File Format ; Docker Driver. Docker with Compose, Machine and Swarm, easy steps from localhost to cloud providers. Compose can be read from a docker-compose. So the pipeline has 3 steps 1. Conclusions. In my previous article on Docker Compose, I showed how to build a two-container application using a MySQL container and a Ghost container using official Docker hub images. docker-compose build. This technology allows users to interact with the services of an application by using a Yamal Ain`t Markup Language (YAMAL) based Compose file. This Docker container (build agents) will be created when the CI pipeline runs;. Below are. Docker-compose file with a spring application and MySQL database. com to create one. The value can be a path to a directory containing Dockerfile , or path including filename. It would be possible for me to have a: docker-compose. yml file to run passbolt container. yml in a specific service configuration for your target platform. The containers are identified either by its image name or by the ‘build’ configuration keyword that asks Compose to build it before to deploy it. The build process can refer to any of the files in the context. yaml # cd ~/aevolume. Docker’s container image tools were also an advance over LXC, allowing a developer to build libraries of images, compose applications from multiple images, and launch those containers and. If you are used to working with Docker and Docker Compose, you could be overwhelmed by the concept differences between what you expect in ECS, and how it actually works. Using docker-compose files to target multiple environments. Docker Compose can pass on these variables to the containers as build time variables (when building the images) and / or as run time variables (when running the containers). txt” on the host machine and we can see all the application logs in that file? In other words, is there a way we could extract the logs of an application running inside a. Bit of an coincidence! I have spent the better part of my weekend trying to get a grip on Docker with the goal to deploy a sample-ish ASP. Docker-compose. rng-tools/haveged for faster filling of container entropy pool. docker-compose. In addition, it will rebuild your images before starting the containers. This course introduces Docker to an Absolute Beginner using really simple and easy to understand lectures. yml \ -f quickstart-mysql. Docker multi-stage builds with Docker Compose When defining a multi service environment with Docker and Docker Compose, the usual way was to use a Dockerfile for each service, starting with the base image and adding all custom needs:. docker build -t networknt/light-router:latest -f. Once we’ve built. Target process exited without raising a CoreCLR started. You create a docker-compose. Docker can help you build a Home Media Server in just minutes without complex setups. yaml file in the repository root directory, pull the required docker image, and run an specific command to build mraa for the requested target. And test runs tests against the started service. A target reflects a single docker build invocation with the same options that you would specify for docker build. yml that would work using docker-compose 1. That means if there is no docker image available for the given name, then it will directly build the image. Bringing up Docker containers with docker-compose. My example repo shows you how to using node directly in your Dockerfile, and then for local development, either build use a different image stage with docker build --target , or override the CMD in your compose YAML. With that feature enabled you will be able to run both Linux and Windows containers side-by-side with a single Docker engine. This will add a Dockerfile and a docker-compose project to your solution. The docker layer cache will kick-in so it will actually resume from the previous layer. With this command you just build one container. txt” on the host machine and we can see all the application logs in that file? In other words, is there a way we could extract the logs of an application running inside a. In the last article, I wrote about how to containerize a simple standalone spring boot application that doesn’t have a dependency on any other service or database. dockerignore file in the docker-compose node in the solution, and that project shows in boldface font, which shows that it's the startup project. Containers. The syntax for YAML is quite simple and the repo already contains the docker-compose file that we'll be using. sudo docker-compose build app It must be clear, that in any case you need to run the Maven build to recreate your jar file, otherwise the change will not be available either. yml - The base Docker Compose file used to define the collection of images built and run with docker-compose build and docker-compose run, respectively. Since we want to version all of our scripts and docker-compose. Note:- the docker file is simple, built from alpine-java-8 and a copy command to copy jar to container to start spring boot app. BUILD is a lazily evaluated Make variable (created with GNU make thunk -pattern). A big advantage for this choice is that if you add more services to your solution. Docker Compose is a platform for defining and running multi-container Docker applications. yml file to first compile the code. To create similar environments optimised for efficient development or CI. Apart from Docker Commit we can build the Docker images using “Dockerfile“. Compose should support specifying target stage in the build definition. Our TravisCI builds include a target that build Docker containers and runs the tests inside. test: $(GOLANG_DEPS_DIR) docker-compose run --rm golang make _test _test: go test -v Building. Conclusions. docker-compose build. Build the docker image docker build -t react-cli. single containers and "stacks" that are meant to be deployed onto Kubernetes or Swarm orchestrators. yml ├── docker-compose. If cmds or build are also present in the same target, they are executed after docker-compose launched the containers. Dockerfile. Use Multiple Compose Files. Continuous Integration and Delivery of Microservices using Jenkins CI, Maven, and Docker Compose Continuously build, test, package and deploy a microservices-based, multi-container, Java EE application using Jenkins CI, Maven, Docker, and Docker Compose. There are two key forms of Docker Compose that you'll use in your project: Docker Compose comes in the form of a command line command that you'll use to build, ship and run multi-container applications. Simplifying Kubernetes with Docker Compose and Friends By Gareth Rushgrove. TL;DR I also don’t recommend using npm to start your apps in your Dockerfile. Because with docker save i only got the image itself. Jon Sud Jon Sud. Portainer has been a great asset and we have started to rely on it for single-container image management. Docker Compose Up. A build’s context is the set of files located in the specified PATH or URL. Therefore, it is not allowed to upload any personal data. Best of all its compatible with Docker Compose. With Compose, you use a YAML file to configure your application's services. NET WebAPI application from a previous post with Windows Containers. yml) is generated by visual studio itself and it is different depending on the build mode (debug or release). The list of packages using docker-py is actually quite short: atomic, docker-compose, flr, atomic-reactor, docker-squash, sen. docker-compose build. docker-compose -f. Docker Compose makes the service available by that name for inter-container connectivity. Build the Docker image. debug[ ``` ``` These slides have been built from commit: e0b27ae [common/ti. Newer versions use Docker Python SDK 2. OK, I Understand. The current table covers all current possible Docker Compose keys. Build multi-stage docker file but stop it at a layer that has all your testing tools (using docker target argument) 2. Click Apply. yml file, you can start the virtual machine by running this command in the project root directory: docker-compose up -d. I’m going to assume you know a little bit of Docker (Although it’s not necessary) to keep it working. Basically in Make, we have two methods. A Docker image is a recipe for running a containerized process, and in this guide, we will build one for a simple Spring boot application. Backup target is a local NAS. Visual Studio creates a docker-compose. But you would be wrong! When you run the docker-compose project, it appears as if it is just executing your dockerfile and then running the container it just built. In this tutorial, I'm going to walk through how to build Docker containers using Ansible. ECS CLI, is a command line tool that helps you manage an ECS cluster and services. yml file, and then we can start everything using a simple docker-compose up command, and then docker-compose down to stop all containers, tearing down networks and so on. Looking at the compatibility matrix, it should be added in 3. Estimated Reading Time: 5 minutes Docker Compose has gained lots of attention in the recent past due to its easy one-liner installation(on Linux, Windows & Mac OS X), easy-to-use JSON & YAML format support , available sample docker-compose files on GITHUB and a one-liner command to create and start all the services from your configuration. This command can be used to build new image or rebuild existing images. Execute the below command to see the status. In this post, you'll learn about microservices architecture and how to implement it using Spring Boot. fig, composition, compose, docker, orchestration, cli, build. If you are used to working with Docker and Docker Compose, you could be overwhelmed by the concept differences between what you expect in ECS, and how it actually works. Then VS will start a container of your image, so as soon it is running will publish the code to the current WORKDIR inside the container, start the application and attach to debug. $ docker-compose -f quickstart. ├── docker-compose. When we run docker-compose build, Docker will create an image with node set up as specified in the Dockerfile. Bit of an coincidence! I have spent the better part of my weekend trying to get a grip on Docker with the goal to deploy a sample-ish ASP. Then docker-compose up will start a container with that image and run the echo command, which shows that everything is set up OK. Let’s see an example of docker-compose. docker image ls. I haven't used environment files but I had no trouble with a docker compose for telegraf influxdb and grafana or with building my own container images with docker build. The code in the file would look like: Docker-compose. As you can see, in a generic and simple way we can run any docker-compose as a service of the machine with the advantage of being able to run at the start of the machine. Target start spawns the built service in the background using compose. For example, you can change the name of the Dockerfile, specify tags and labels for your images, provide additional arguments passed to Docker commands, and control whether Visual Studio does certain performance. Build multi-stage docker file but stop it at a layer that has all your testing tools (using docker target argument) 2. Very content with finally having scratched the surface of the Docker CLI’s and setup. You will need to modify the docker-compose. Docker Compose Rm Settings: Settings for docker build. Support for the target option is missing in 3. Since we have more than one container, it makes sense to build with --parallel. Compose is a tool for defining and running multi-container Docker applications. yml example with GitLab running on a custom HTTP and SSH port. Multi-stage Dockerfile. The Codefresh YAML syntax is pretty straight forward. yml specification. This is not a detailed guide for the deployment, so it's assumed understanding of the concepts of ECS, Docker and Pipelines. Choose Docker Compose. You used docker-compose to build and run the application. docker inspect image:version | jq. ps1 script runs building and running your containers using Docker-Compose You make changes to your files within Visual Studio. Docker — from the beginning, Part IV, Part IV, this is how we manage more than one service using Docker Compose ( this is 1/2 part on Docker Compose) Docker - from the beginning, Part V, this part is the second and concluding part on Docker Compose where we cover Volumes, Environment Variables and working with Databases and Networks. Host is debian9, 64 bit. This Docker container (build agents) will be created when the CI pipeline runs;. Docker Compose File Docker Compose makes it easier to configure and run applications made up of multiple containers. docker-compose -p jenkins down docker-compose build docker-compose -p jenkins up -d. Deploying with Docker Compose. NET Core web container is build with a multi-stage. What is docker? Definitely a hot topic in cloud computing with several job opportunities. This is definitely a great news for popular communities like Elastic Stack, Redis etc. If you change a service’s Dockerfile or the contents of its build directory, run docker-compose build to rebuild it. Depending on your target platform, you need to adjust the settings or translate the docker-compose. Best of all its compatible with Docker Compose. yml – The base Docker Compose file used to define the collection of images built and run with docker-compose build and docker-compose run, respectively. A build and deployment pipeline with Maven, Docker and Jenkins This is a little story about setting up a build and deployment pipeline for a small service. docker-py). Course Link- Docker Mastery: The Complete Toolset From a Docker Captain Build, compose, deploy, and manage. Below is another docker-compose. Intro to managing and running a containerized Java Spring Boot application. , which offers. Docker-compose命令大体上和docker命令类似,除了一些给多容器应用的使用的附加指令。尤其是下面这些命令,和docker命令很类似: docker-compose up / down. docker-compose -f. Use multi-stage builds Estimated reading time: 6 minutes Multi-stage builds are a new feature requiring Docker 17. Orchestrate applications, create VMs, cluster and scale, on AWS EC2 and Google Compute Engine and others. Top-level keys that define a section in the configuration file such as build, deploy, depends_on, networks, and so on, are listed with the options that support them as sub-topics. It can also track which services you’ve removed from your docker-compose. The value can be a path to a directory containing Dockerfile , or path including filename. We’re also going to learn more about Docker Hub and how to make our own local Docker registry. In this code, two services with the names php and db are defined these two will connect to run the final application. The most straightforward tool is the docker-compose command. When running Docker Swarm and plenty of Docker nodes and containers instead of a single Docker node, there are some challenges when it comes to uptime and performance monitoring. また、docker-compose. Let’s take a look at that idea. docker-compose. Using docker-compose files to target multiple environments The docker-compose. yml run --rm --entrypoint pytest python There are a few Gitlab CI specific things in here, such as the definition of the docker:dind service and the image within which to run the build, both required to have docker available. Naturally you will need Jenkins and its dependencies, but you don't need anything for running the build commands. A log directory is also mounted. A Developer typically uses Docker for Mac or Docker for Windows. Docker's Swarm Mode is a great way to run web applications in a highly available distributed environment. Additionally, our other dependencies (Redis and the Flask API will be started as well. So in docker compose you define several networks and assign the services (containers) to the different networks thereby specifying their static IP within the ip range of the network. But what is a docker container and what are its benefits? If you are curious enough to learn about docker and docker container, the need for Docker tools fro a future in DevOps, Click here now!. yml logs broker. Note: We don’t support anything 3. Docker compose makes it easy to start and stop multiple containers on a single host. In order to try Docker multi-stage build, you need to get Docker 17. Docker and Virtualenv? A clean way to locally install python dependencies with pip in Docker. dev I found stop-at-a-specific-build-stage option for docker build cmd. Now we can up the Compose service again. docker up -d. yml is created, while in debug mode the file docker-compose. Using the automation power of Jenkins, this tutorial provides a step-by-step manual for automating the process of building a Java app from Docker containers. When you execute a docker-compose command, the volumes directive in docker-compose. These tools come handy in cases where GnuPG complains about no entropy is available to perform some operation (generate keys, encrypt, sign…) inside the docker container. In the following build config, the Docker build step is called twice to build two images, for which the source code files are found in the current working directory at build time, as indicated by. docker-compose will take a look at the docker-compose. Use your existing Docker compose files to orchestrate containers on a single Docker daemon or on Swarm. In the following example, we'll demonstrate how to add an Anchore Enterprise UI to an existing Anchore Engine installation, by modifying the existing docker-compose. All information is defined in a docker-compose. The starting point source code for this part can be found on the docker-series-docker-compose-end branch of our docker-series repo on GitHub. We will be using solr-precreate command, which will create a core named gettingstarted if it does not exist. I enabled ssh access and store the compose files in my user profile (off the top of my head I can’t remember the path but it’s not a normal /home). Elasticsearch is a search and analytics engine. Docker Multi-stage builds is a great way to build smaller Docker images optimized for production use without having things like build tools in the final image. But what is a docker container and what are its benefits? If you are curious enough to learn about docker and docker container, the need for Docker tools fro a future in DevOps, Click here now!. While Docker Compose is mainly known and used in a development environment, it can actually be used in production too. Then ideally only the web containers in the relevant Docker Compose app should be affected by that deployment. yml build --target www. There’s also a shorthand command, docker-compose down, that stops and removes everything created by docker-compose up. I'm trying to figure out the proper way to get build environments into a CI pipeline. yml – An optional file, read by Docker Compose, with configuration. If you change a service’s Dockerfile or the contents of its build directory, run docker-compose build to rebuild it. single containers and “stacks” that are meant to be deployed onto Kubernetes or Swarm orchestrators. $> docker-compose up --build. Visual Studio Team Services (VSTS) is a great tool to handle your build and release pipelines, even for non Windows applications. Start Node Directly in Dockerfiles. Choose your Target OS, for example, Linux. Use multi-stage builds Estimated reading time: 6 minutes Multi-stage builds are a new feature requiring Docker 17. Docker Compose Build Settings; Docker Compose Create Settings; Docker Compose Down Rmi Type; Docker Compose Down Settings; Docker Compose Exec Settings; Docker Compose Kill Settings; Docker Compose Logs Settings; Docker Compose Port Settings; Docker Compose Ps Settings; Docker Compose Pull Settings; Docker Compose Restart Settings; Docker. sh and docker-compose*. For example, you might want to have specific packages or database migration scripts only available at build and release time, but not in your final production image. We don't really have any build process required for these scripts (ignoring our web app image itself which we build through a separate. NET Apps Without Being a DevOps Guru By Julie Lerman. docker-compose up -d. Once we’ve built. To run docker compose with another file than the default one docker-compose. 05 • Use of multiple FROM statements • Splitting the build process into several sections • Reduction of image size • software is part of the build context and is copied • Optional download of the software from a local web server • Start Docker Build with the command. yml The docker-compose. If the Compose file specifies an image name, the image is tagged with that name, substituting any variables beforehand. $> docker-compose up --build. yml file and a. The containers will be running in the background because of the -d flag. Unfortunately, Portainer has been designed for 2 key use-cases. yml are pulled from the registry and cached on your development machine. Once the build is completed, you will have a build/ folder in the repository root with all the. Simplifying Kubernetes with Docker Compose and Friends By Gareth Rushgrove. In previous example we saw we had to do the following steps manually to start multiple docker containers-- * Create custom docker network named cons. yaml) file or inline using the definition option. Define the run environment for your app. Use multi-stage builds Estimated reading time: 6 minutes Multi-stage builds are a new feature requiring Docker 17. The --build-arg option can now be used without specifying a service in docker-compose build. Working with Docker. Important considerations. yml for prod. This app uses container images downloaded directly from Docker Hub, Docker's public image repository. /image1 cd. Another observation: This works in zsh: (trap '' SIGINT && docker-compose up --build | less +F -r) (it does not react to SIGINT at all) The same line behaves differently in bash and is killed. The important part when deploying any of the monitoring components is that they need to run on all nodes within the swarm to allow full visibility. Because with docker save i only got the image itself. Depending on your target platform, you need to adjust the settings or translate the docker-compose. This Docker container (build agents) will be created when the CI pipeline runs;. com to create one. Continuous Deployment for Docker with VSTS and Azure Container Registry Simon Azure , Build , CI , Cloud , Containers , Visual Studio Team Services , VSTS , Web Apps October 23, 2017 5 Minutes I've been watching with interest the growing maturity of Containers, and in particular their increasing penetration as a hosting and deployment. TARGET is the URL of the web service under test. Introduction. React component for Gmail or Facebook -like drag and drop file uploader. With Compose, you use a YAML file to configure your application’s services. It is also possible to use multiple compose files. Also see docker/compose#2957 (comment), which goes a bit deeper into "what happens under the hood" All the other steps are the same as the previous example, so if the volume is empty, but the container has files at the target location, those files (and their attributes) are copied on first run. Docker Multi-stage builds is a great way to build smaller Docker images optimized for production use without having things like build tools in the final image. Copying betwen Docker build stages in multi-stage build Unless we explicitly specify a --target, Docker multi-stage builds will tag their last stage. Docker CE 19. Newer versions use Docker Python SDK 2. Thanks to publicly available Docker images, all we need to do is add a few lines to our docker-compose. Added support for the tmpfs. txt in the current directory before starting the next build. class: center, middle # An introduction to ![Docker](media/docker/small_v-trans. Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR - Makefile docker-compose build --no-cache $(APP_NAME). We will now execute a query to test the rich features of prometheus. with this command my tools has been run completely. moby/moby#32496 @dnephin Add target property to build So only version 3. Docker Compose configuration. プログラミングに関係のない質問 やってほしいことだけを記載した丸投げの質問 問題・課題が含まれていない質問 意図的に内容が抹消された質問 広告と受け取られるような投稿. This guide details out steps to deploy and TIBCO FTL® with TIBCO BusinessWorks™ Container Edition on docker containers. 104) So it seems that we can really set a static ip to a container, why with docker-compose we can’t?. A Docker image is a recipe for running a containerized process, and in this guide, we will build one for a simple Spring boot application. moby/moby#32496 @dnephin Add target property to build So only version 3. Для управления им через systemd - со. Then we add the source directory in docker and build the jar file. Create dockerfile of each service; Create a docker-compose. In this article, we will cover how you can use docker compose to use celery with python flask on a target machine. $ docker-compose -f quickstart. References Command Line ; File Format ; Docker Driver. Estimated Reading Time: 5 minutes Docker Compose has gained lots of attention in the recent past due to its easy one-liner installation(on Linux, Windows & Mac OS X), easy-to-use JSON & YAML format support , available sample docker-compose files on GITHUB and a one-liner command to create and start all the services from your configuration. Deploying with Docker Compose. docker-compose. yml --project-directory. Simplifying Kubernetes with Docker Compose and Friends By Gareth Rushgrove. Docker and its ecosystem of tools can help us target the requirements above without the large investment of time and resources to support all the tools mentioned above. The fact-checkers, whose work is more and more important for those who prefer facts over lies, police the line between fact and falsehood on a day-to-day basis, and do a great job. Today, my small contribution is to pass along a very good overview that reflects on one of Trump’s favorite overarching falsehoods. Namely: Trump describes an America in which everything was going down the tubes under  Obama, which is why we needed Trump to make America great again. And he claims that this project has come to fruition, with America setting records for prosperity under his leadership and guidance. “Obama bad; Trump good” is pretty much his analysis in all areas and measurement of U.S. activity, especially economically. Even if this were true, it would reflect poorly on Trump’s character, but it has the added problem of being false, a big lie made up of many small ones. Personally, I don’t assume that all economic measurements directly reflect the leadership of whoever occupies the Oval Office, nor am I smart enough to figure out what causes what in the economy. But the idea that presidents get the credit or the blame for the economy during their tenure is a political fact of life. Trump, in his adorable, immodest mendacity, not only claims credit for everything good that happens in the economy, but tells people, literally and specifically, that they have to vote for him even if they hate him, because without his guidance, their 401(k) accounts “will go down the tubes.” That would be offensive even if it were true, but it is utterly false. The stock market has been on a 10-year run of steady gains that began in 2009, the year Barack Obama was inaugurated. But why would anyone care about that? It’s only an unarguable, stubborn fact. Still, speaking of facts, there are so many measurements and indicators of how the economy is doing, that those not committed to an honest investigation can find evidence for whatever they want to believe. Trump and his most committed followers want to believe that everything was terrible under Barack Obama and great under Trump. That’s baloney. Anyone who believes that believes something false. And a series of charts and graphs published Monday in the Washington Post and explained by Economics Correspondent Heather Long provides the data that tells the tale. The details are complicated. Click through to the link above and you’ll learn much. But the overview is pretty simply this: The U.S. economy had a major meltdown in the last year of the George W. Bush presidency. Again, I’m not smart enough to know how much of this was Bush’s “fault.” But he had been in office for six years when the trouble started. So, if it’s ever reasonable to hold a president accountable for the performance of the economy, the timeline is bad for Bush. GDP growth went negative. Job growth fell sharply and then went negative. Median household income shrank. The Dow Jones Industrial Average dropped by more than 5,000 points! U.S. manufacturing output plunged, as did average home values, as did average hourly wages, as did measures of consumer confidence and most other indicators of economic health. (Backup for that is contained in the Post piece I linked to above.) Barack Obama inherited that mess of falling numbers, which continued during his first year in office, 2009, as he put in place policies designed to turn it around. By 2010, Obama’s second year, pretty much all of the negative numbers had turned positive. By the time Obama was up for reelection in 2012, all of them were headed in the right direction, which is certainly among the reasons voters gave him a second term by a solid (not landslide) margin. Basically, all of those good numbers continued throughout the second Obama term. The U.S. GDP, probably the single best measure of how the economy is doing, grew by 2.9 percent in 2015, which was Obama’s seventh year in office and was the best GDP growth number since before the crash of the late Bush years. GDP growth slowed to 1.6 percent in 2016, which may have been among the indicators that supported Trump’s campaign-year argument that everything was going to hell and only he could fix it. During the first year of Trump, GDP growth grew to 2.4 percent, which is decent but not great and anyway, a reasonable person would acknowledge that — to the degree that economic performance is to the credit or blame of the president — the performance in the first year of a new president is a mixture of the old and new policies. In Trump’s second year, 2018, the GDP grew 2.9 percent, equaling Obama’s best year, and so far in 2019, the growth rate has fallen to 2.1 percent, a mediocre number and a decline for which Trump presumably accepts no responsibility and blames either Nancy Pelosi, Ilhan Omar or, if he can swing it, Barack Obama. I suppose it’s natural for a president to want to take credit for everything good that happens on his (or someday her) watch, but not the blame for anything bad. Trump is more blatant about this than most. If we judge by his bad but remarkably steady approval ratings (today, according to the average maintained by 538.com, it’s 41.9 approval/ 53.7 disapproval) the pretty-good economy is not winning him new supporters, nor is his constant exaggeration of his accomplishments costing him many old ones). I already offered it above, but the full Washington Post workup of these numbers, and commentary/explanation by economics correspondent Heather Long, are here. On a related matter, if you care about what used to be called fiscal conservatism, which is the belief that federal debt and deficit matter, here’s a New York Times analysis, based on Congressional Budget Office data, suggesting that the annual budget deficit (that’s the amount the government borrows every year reflecting that amount by which federal spending exceeds revenues) which fell steadily during the Obama years, from a peak of $1.4 trillion at the beginning of the Obama administration, to $585 billion in 2016 (Obama’s last year in office), will be back up to $960 billion this fiscal year, and back over $1 trillion in 2020. (Here’s the New York Times piece detailing those numbers.) Trump is currently floating various tax cuts for the rich and the poor that will presumably worsen those projections, if passed. As the Times piece reported: