2

I'm a bit of a newb so bear with me. I'm familiar with writing local applications and scripts to automate admin tasks that I need to do, but now I'm trying to get familiar with the Gitlab CI/CD process. I have been using (and loving) VSCode devcontainers because I fell into a hole of learning Python virtual environments and trying to manage different python versions, etc., and devcontainers makes all that headache go away for me. Now I'm trying to figure out how I can write a simple application (like a flask endpoint) and deploy it via Gitlab CI/CD.

I'm currently stuck on how to transition my VSCode Dockerfile for the devcontainer to a production ready Dockerfile. For instance, the VSCode Dockerfile uses a VSCode base image that I wouldn't imagine would be acceptable in a production environment. Is there a best practice for creating a production Docker configuration for deployments? If it is simply a matter of creating a separate Dockerfile, doesn't that defeat one of the purposes of using Docker containers for development? You would still have a situation of "well it works in my container..."

4

0 回答 0