attempting to get dev container stood up, not there yet
This commit is contained in:
parent
d69ae01232
commit
0045d33984
22
.devcontainer/Dockerfile
Normal file
22
.devcontainer/Dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
# For more information, please refer to https://aka.ms/vscode-docker-python
|
||||
FROM python:3.8-slim-buster
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
# Keeps Python from generating .pyc files in the container
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
# Turns off buffering for easier container logging
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
# Set the working directory for any subsequent commands to the app directory
|
||||
WORKDIR /app
|
||||
|
||||
# Expose a voume for the app directory
|
||||
VOLUME /app
|
||||
|
||||
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
|
||||
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
|
||||
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
|
||||
USER appuser
|
||||
|
||||
@ -1,13 +1,16 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
||||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/docker-existing-dockerfile
|
||||
{
|
||||
"name": "Existing Dockerfile",
|
||||
"name": "simpleblogapi-dev-container",
|
||||
"dockerComposeFile": "./docker-compose.yml",
|
||||
"service": "simpleblogapi",
|
||||
"workspaceFolder": "/app",
|
||||
|
||||
// Sets the run context to one level up instead of the .devcontainer folder.
|
||||
"context": "..",
|
||||
// "context": "..",
|
||||
|
||||
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
|
||||
"dockerFile": "../Dockerfile",
|
||||
// "dockerFile": "../Dockerfile",
|
||||
|
||||
// Set *default* container specific settings.json values on container create.
|
||||
"settings": {
|
||||
@ -15,10 +18,10 @@
|
||||
},
|
||||
|
||||
// Add the IDs of extensions you want installed when the container is created.
|
||||
"extensions": []
|
||||
"extensions": [],
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
"forwardPorts": [5000]
|
||||
|
||||
// Uncomment the next line to run commands after the container is created - for example installing curl.
|
||||
// "postCreateCommand": "apt-get update && apt-get install -y curl",
|
||||
|
||||
11
.devcontainer/docker-compose.yml
Normal file
11
.devcontainer/docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
version: '3.4'
|
||||
|
||||
services:
|
||||
simpleblogapi:
|
||||
image: simpleblogapi
|
||||
build: .
|
||||
volumes:
|
||||
- ../:/app
|
||||
ports:
|
||||
- 5000:5000
|
||||
tty: true
|
||||
@ -8,3 +8,4 @@ services:
|
||||
dockerfile: ./Dockerfile
|
||||
ports:
|
||||
- 5000:5000
|
||||
tty: true
|
||||
|
||||
Reference in New Issue
Block a user